display: Remove unused code 29/290229/3
authorYoungjae Cho <y0.cho@samsung.com>
Mon, 20 Mar 2023 10:00:42 +0000 (19:00 +0900)
committerYoungjae Cho <y0.cho@samsung.com>
Mon, 27 Mar 2023 04:40:02 +0000 (13:40 +0900)
Removed unused get_var_backlight_ops() and MAX() macro.

Change-Id: I872e077f68a5e14153130eef57a3123657fbd4df
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
src/display/ambient-mode.c
src/display/auto-brightness.c
src/display/display-dbus.c
src/display/display-lock.c
src/display/display-panel.c
tests/usb-host-ffs-test-daemon/usb-host-ffs-test-daemon.c

index 8f4cdb7..581d9b3 100644 (file)
@@ -46,7 +46,6 @@
 #define AMBIENT_CLOCK_WAITING_TIME     5000 /* ms */
 
 static struct display_plugin *disp_plgn;
-static struct _backlight_ops *backlight_ops;
 static int ambient_state;
 static int ambient_condition;  /* Setting Value */
 static pid_t ambient_pid;  /* Ambient Clock pid */
@@ -310,8 +309,4 @@ static void __CONSTRUCTOR__ initialize(void)
        disp_plgn = get_var_display_plugin();
        if (!disp_plgn)
                _E("Failed to get display plugin variable.");
-
-       backlight_ops = get_var_backlight_ops();
-       if (!backlight_ops)
-               _E("Failed to get backlight operator variable.");
 }
index 866c6ad..a5f75ef 100644 (file)
@@ -61,7 +61,6 @@
 #define ON_COUNT       1
 #define OFF_COUNT      1
 
-static struct _backlight_ops *backlight_ops;
 static int (*_default_action) (int);
 static guint alc_timeout_id = 0;
 static guint update_timeout;
@@ -685,10 +684,6 @@ DISPLAY_OPS_REGISTER(&display_autobrightness_ops)
 
 static void __CONSTRUCTOR__ initialize(void)
 {
-       backlight_ops = get_var_backlight_ops();
-       if (!backlight_ops)
-               _E("Failed to get backlight operator variable.");
-
        display_conf = get_var_display_config();
        if (!display_conf)
                _E("Failed to get display configuration variable.");
index cdcfc38..88a3ee6 100644 (file)
@@ -73,7 +73,6 @@
 #define EXPIRED_POPUP_ID     "_REQUEST_ID_"
 
 static struct display_plugin *disp_plgn;
-static struct _backlight_ops *backlight_ops;
 static const struct display_config *display_conf;
 
 static GVariant *dbus_start(GDBusConnection *conn,
@@ -1473,10 +1472,6 @@ static void __CONSTRUCTOR__ initialize(void)
                _E("Failed to get display plugin variable.");
        }
 
-       backlight_ops = get_var_backlight_ops();
-       if (!backlight_ops)
-               _E("Failed to get backlight operator variable.");
-
        display_conf = get_var_display_config();
        if (!display_conf)
                _E("Failed to get display configuration variable.");
index fa5170b..3bd8590 100644 (file)
@@ -38,7 +38,6 @@
 #define no_transition_timer()    (get_transition_timer() == 0)
 #define no_foreground_lock(st)   (check_lock_state(st) == false)
 
-static struct _backlight_ops *backlight_ops;
 static GList *cond_head[S_END];
 static int trans_condition;
 
@@ -567,10 +566,6 @@ void update_lock_timer(PMMsg *data,
 
 static void __CONSTRUCTOR__ initialize(void)
 {
-       backlight_ops = get_var_backlight_ops();
-       if (!backlight_ops)
-               _E("Failed to get backlight operator variable.");
-
        display_conf = get_var_display_config();
        if (!display_conf) {
                _E("Failed to get display config variable.");
index 7900a58..be401df 100644 (file)
@@ -34,8 +34,6 @@
 
 static int dpms_running_state = DPMS_SETTING_DONE;
 
-static struct _backlight_ops *backlight_ops;
-
 /* FIXME: This function is for temporary use, should be fixed after plugin refactoring */
 int display_panel_set_dpms_state(int dpms_on, enum device_flags flags)
 {
@@ -367,11 +365,3 @@ int display_panel_get_frame_rate(int *frame_rate)
 
        return hal_device_display_get_frame_rate(frame_rate);
 }
-
-/* FIXME: This code structure should be changed to plugin api call, after plugin refactoting*/
-static void __CONSTRUCTOR__ initialize(void)
-{
-       backlight_ops = get_var_backlight_ops();
-       if (!backlight_ops)
-               _W("Failed to get backlight operator variable.");
-}
\ No newline at end of file
index 0579d18..48668a8 100644 (file)
@@ -46,8 +46,6 @@ enum {
        NUM_ENDPOINTS,
 };
 
-#define MAX(a, b) ((a) > (b) ? (a) : (b))
-
 #define report_error(...) do {                 \
                fprintf(stderr, __VA_ARGS__);   \
                putchar('\n');                  \