From e40ed08ddd42dfca6f7bc3c9cbf9dbc3dcbb0a79 Mon Sep 17 00:00:00 2001 From: TaeminYeom Date: Wed, 15 Feb 2023 12:00:27 +0900 Subject: [PATCH] display: Change DPMS init and exit fucntion name For consistent naming rule with other DPMS function, change the names. init_dpms -> dpms_init exit_dpms -> dpms_exit add_timer_for_init_dpms -> add_timer_for_dpms_init delayed_init_done_dpms -> delayed_dpms_init_done Change-Id: I1de2c9741526238d33c03e815f2ff73fa2a13f9f Signed-off-by: TaeminYeom --- plugins/iot-headed/display/core.c | 14 +++++++------- plugins/iot-headed/display/device-interface.c | 2 +- plugins/mobile/display/core.c | 14 +++++++------- plugins/mobile/display/device-interface.c | 2 +- plugins/tv/display/core.c | 14 +++++++------- plugins/tv/display/device-interface.c | 2 +- plugins/wearable/display/core.c | 14 +++++++------- plugins/wearable/display/device-interface.c | 2 +- src/display/display-dpms.c | 10 +++++----- src/display/display-dpms.h | 4 ++-- 10 files changed, 39 insertions(+), 39 deletions(-) diff --git a/plugins/iot-headed/display/core.c b/plugins/iot-headed/display/core.c index 47e7e01..6952ccc 100644 --- a/plugins/iot-headed/display/core.c +++ b/plugins/iot-headed/display/core.c @@ -1940,11 +1940,11 @@ static int battery_health_changed(void *data) return 0; } -static gboolean delayed_init_done_dpms(gpointer data) +static gboolean delayed_dpms_init_done(gpointer data) { int timeout; - if (!init_dpms()) + if (!dpms_init()) return G_SOURCE_CONTINUE; switch (get_pm_cur_state()) { @@ -1971,11 +1971,11 @@ static gboolean delayed_init_done_dpms(gpointer data) return G_SOURCE_REMOVE; } -static void add_timer_for_init_dpms(void) +static void add_timer_for_dpms_init(void) { - guint id = g_timeout_add(500/* milliseconds */, delayed_init_done_dpms, NULL); + guint id = g_timeout_add(500/* milliseconds */, delayed_dpms_init_done, NULL); if (id == 0) - _E("Failed to add init_dpms timeout."); + _E("Failed to add dpms_init timeout."); } /** @@ -2167,13 +2167,13 @@ static void display_init(void *data) * since display manager can be launched later than deviced. * In the case, display cannot be turned on at the first booting */ // wm_ready = check_wm_ready(); - if (init_dpms()) { + if (dpms_init()) { if (is_lcdon_blocked() != LCDON_BLOCK_NONE) lcd_off_procedure(LCD_OFF_BY_EVENT); else lcd_on_procedure(LCD_NORMAL, LCD_ON_BY_EVENT); } else { - add_timer_for_init_dpms(); + add_timer_for_dpms_init(); } if (display_conf.lcd_always_on) { diff --git a/plugins/iot-headed/display/device-interface.c b/plugins/iot-headed/display/device-interface.c index 188f583..1d716b7 100644 --- a/plugins/iot-headed/display/device-interface.c +++ b/plugins/iot-headed/display/device-interface.c @@ -823,7 +823,7 @@ int exit_sysfs(void) backlight_update(); - exit_dpms(); + dpms_exit(); ops = find_device("touchscreen"); if (!check_default(ops)) diff --git a/plugins/mobile/display/core.c b/plugins/mobile/display/core.c index 4927f70..61e5d41 100644 --- a/plugins/mobile/display/core.c +++ b/plugins/mobile/display/core.c @@ -1950,11 +1950,11 @@ static int battery_health_changed(void *data) return 0; } -static gboolean delayed_init_done_dpms(gpointer data) +static gboolean delayed_dpms_init_done(gpointer data) { int timeout; - if (!init_dpms()) + if (!dpms_init()) return G_SOURCE_CONTINUE; switch (get_pm_cur_state()) { @@ -1981,11 +1981,11 @@ static gboolean delayed_init_done_dpms(gpointer data) return G_SOURCE_REMOVE; } -static void add_timer_for_init_dpms(void) +static void add_timer_for_dpms_init(void) { - guint id = g_timeout_add(500/* milliseconds */, delayed_init_done_dpms, NULL); + guint id = g_timeout_add(500/* milliseconds */, delayed_dpms_init_done, NULL); if (id == 0) - _E("Failed to add init_dpms timeout."); + _E("Failed to add dpms_init timeout."); } /** @@ -2173,13 +2173,13 @@ static void display_init(void *data) * since display manager can be launched later than deviced. * In the case, display cannot be turned on at the first booting */ // wm_ready = check_wm_ready(); - if (init_dpms()) { + if (dpms_init()) { if (is_lcdon_blocked() != LCDON_BLOCK_NONE) lcd_off_procedure(LCD_OFF_BY_EVENT); else lcd_on_procedure(LCD_NORMAL, LCD_ON_BY_EVENT); } else { - add_timer_for_init_dpms(); + add_timer_for_dpms_init(); } if (display_conf.lcd_always_on) { diff --git a/plugins/mobile/display/device-interface.c b/plugins/mobile/display/device-interface.c index d7d79db..f35f24d 100644 --- a/plugins/mobile/display/device-interface.c +++ b/plugins/mobile/display/device-interface.c @@ -838,7 +838,7 @@ int exit_sysfs(void) backlight_update(); - exit_dpms(); + dpms_exit(); ops = find_device("touchscreen"); if (!check_default(ops)) diff --git a/plugins/tv/display/core.c b/plugins/tv/display/core.c index a596b62..e6d22a3 100644 --- a/plugins/tv/display/core.c +++ b/plugins/tv/display/core.c @@ -1940,11 +1940,11 @@ static int battery_health_changed(void *data) return 0; } -static gboolean delayed_init_done_dpms(gpointer data) +static gboolean delayed_dpms_init_done(gpointer data) { int timeout; - if (!init_dpms()) + if (!dpms_init()) return G_SOURCE_CONTINUE; switch (get_pm_cur_state()) { @@ -1971,11 +1971,11 @@ static gboolean delayed_init_done_dpms(gpointer data) return G_SOURCE_REMOVE; } -static void add_timer_for_init_dpms(void) +static void add_timer_for_dpms_init(void) { - guint id = g_timeout_add(500/* milliseconds */, delayed_init_done_dpms, NULL); + guint id = g_timeout_add(500/* milliseconds */, delayed_dpms_init_done, NULL); if (id == 0) - _E("Failed to add init_dpms timeout."); + _E("Failed to add dpms_init timeout."); } /** @@ -2164,13 +2164,13 @@ static void display_init(void *data) * since display manager can be launched later than deviced. * In the case, display cannot be turned on at the first booting */ // wm_ready = check_wm_ready(); - if (init_dpms()) { + if (dpms_init()) { if (is_lcdon_blocked() != LCDON_BLOCK_NONE) lcd_off_procedure(LCD_OFF_BY_EVENT); else lcd_on_procedure(LCD_NORMAL, LCD_ON_BY_EVENT); } else { - add_timer_for_init_dpms(); + add_timer_for_dpms_init(); } if (display_conf.lcd_always_on) { diff --git a/plugins/tv/display/device-interface.c b/plugins/tv/display/device-interface.c index 128b637..a136a0e 100644 --- a/plugins/tv/display/device-interface.c +++ b/plugins/tv/display/device-interface.c @@ -823,7 +823,7 @@ int exit_sysfs(void) backlight_update(); - exit_dpms(); + dpms_exit(); ops = find_device("touchscreen"); if (!check_default(ops)) diff --git a/plugins/wearable/display/core.c b/plugins/wearable/display/core.c index de4d504..406c2dc 100644 --- a/plugins/wearable/display/core.c +++ b/plugins/wearable/display/core.c @@ -2228,11 +2228,11 @@ static int powerlock_load_config(struct parse_result *result, void *user_data) return 0; } -static gboolean delayed_init_done_dpms(gpointer data) +static gboolean delayed_dpms_init_done(gpointer data) { int timeout; - if (!init_dpms()) + if (!dpms_init()) return G_SOURCE_CONTINUE; switch (get_pm_cur_state()) { @@ -2259,11 +2259,11 @@ static gboolean delayed_init_done_dpms(gpointer data) return G_SOURCE_REMOVE; } -static void add_timer_for_init_dpms(void) +static void add_timer_for_dpms_init(void) { - guint id = g_timeout_add(500/* milliseconds */, delayed_init_done_dpms, NULL); + guint id = g_timeout_add(500/* milliseconds */, delayed_dpms_init_done, NULL); if (id == 0) - _E("Failed to add init_dpms timeout."); + _E("Failed to add dpms_init timeout."); } /** @@ -2489,13 +2489,13 @@ static void display_init(void *data) * since display manager can be launched later than deviced. * In the case, display cannot be turned on at the first booting */ // wm_ready = check_wm_ready(); - if (init_dpms()) { + if (dpms_init()) { if (is_lcdon_blocked() != LCDON_BLOCK_NONE) lcd_off_procedure(LCD_OFF_BY_EVENT); else lcd_on_procedure(LCD_NORMAL, LCD_ON_BY_EVENT); } else { - add_timer_for_init_dpms(); + add_timer_for_dpms_init(); } if (display_conf.lcd_always_on) { diff --git a/plugins/wearable/display/device-interface.c b/plugins/wearable/display/device-interface.c index 4683490..e859f29 100644 --- a/plugins/wearable/display/device-interface.c +++ b/plugins/wearable/display/device-interface.c @@ -905,7 +905,7 @@ int exit_sysfs(void) backlight_update(); - exit_dpms(); + dpms_exit(); ops = find_device("touchscreen"); if (!check_default(ops)) diff --git a/src/display/display-dpms.c b/src/display/display-dpms.c index 2b1b156..e995905 100644 --- a/src/display/display-dpms.c +++ b/src/display/display-dpms.c @@ -126,7 +126,7 @@ static void handle_global(void *data, struct wl_registry *registry, info->wl_output= wl_registry_bind(registry, name, &wl_output_interface, 2); if (!info->wl_output) { _E("Failed to bind registry."); - exit_dpms(); + dpms_exit(); return; } _D("Get wl_output."); @@ -134,7 +134,7 @@ static void handle_global(void *data, struct wl_registry *registry, info->tz_dpms_mng = wl_registry_bind(registry, name, &tizen_dpms_manager_interface, 1); if (!info->tz_dpms_mng) { _E("Failed to bind registry."); - exit_dpms(); + dpms_exit(); return; } @@ -562,7 +562,7 @@ int dpms_get_cached_state(void) return dpms_cache; } -bool init_dpms(void) +bool dpms_init(void) { if (dpms_client) return true; @@ -579,7 +579,7 @@ bool init_dpms(void) if (!dpms_client) { _E("Failed to init dpms client."); - exit_dpms(); + dpms_exit(); return false; } _I("Successfully initialized dpms client."); @@ -590,7 +590,7 @@ bool init_dpms(void) return true; } -void exit_dpms(void) +void dpms_exit(void) { _I("Exit dpms."); if (dpms_loop) { diff --git a/src/display/display-dpms.h b/src/display/display-dpms.h index b9ac040..f1bbe2f 100644 --- a/src/display/display-dpms.h +++ b/src/display/display-dpms.h @@ -22,8 +22,8 @@ void dpms_set_state(int on); int dpms_get_state(void); int dpms_get_cached_state(void); -bool init_dpms(void); -void exit_dpms(void); +bool dpms_init(void); +void dpms_exit(void); void __register_dpms_checklist(int mode, void (*checker)(void), const char *caller); #define register_dpms_checklist(mode, checker) __register_dpms_checklist(mode, checker, __func__) #endif /* __DISPLAY_DPMS_H__ */ -- 2.7.4