From 9410317de657726919dfba401f728b38f5a3b527 Mon Sep 17 00:00:00 2001 From: Yunhee Seo Date: Tue, 30 May 2023 20:58:47 +0900 Subject: [PATCH] display: Remove set_dim_state() from plugins. set_dim_state() was only used in ambient_set_condition(). ambient_set_condition() works at only in the wearable device. Thus, set_dim_state() is removed from iot-headed/mobile/wearable. set_dim_state() is changed to static in the wearable plugin. Change-Id: Ic3882436288e815bb765b9cd471c874246217ace Signed-off-by: Yunhee Seo --- plugins/iot-headed/display/core.c | 9 +-------- plugins/mobile/display/core.c | 9 +-------- plugins/tv/display/core.c | 9 +-------- plugins/wearable/display/core.c | 2 +- 4 files changed, 4 insertions(+), 25 deletions(-) diff --git a/plugins/iot-headed/display/core.c b/plugins/iot-headed/display/core.c index 4aadb8c..0dcadf9 100644 --- a/plugins/iot-headed/display/core.c +++ b/plugins/iot-headed/display/core.c @@ -366,13 +366,6 @@ static void update_display_locktime(int time) update_display_time(); } -void set_dim_state(bool on) -{ - _I("Dim state is %d.", on); - update_display_time(); - states[get_pm_cur_state()].trans(EVENT_INPUT); -} - void lcd_on_direct(enum device_flags flags) { enum hal_device_power_transition_reason reason; @@ -1492,7 +1485,7 @@ static int display_probe(void *data) dp->config = &display_conf; init_display_states(dp); setup_display_plugin_backlight_ops(dp); - dp->set_dim_state = set_dim_state; + dp->set_dim_state = NULL; dp->get_device_flags = NULL; setup_display_plugin_backlight_ops(dp); diff --git a/plugins/mobile/display/core.c b/plugins/mobile/display/core.c index 6c72abe..33e50d8 100644 --- a/plugins/mobile/display/core.c +++ b/plugins/mobile/display/core.c @@ -373,13 +373,6 @@ static void update_display_locktime(int time) update_display_time(); } -void set_dim_state(bool on) -{ - _I("Dim state is %d.", on); - update_display_time(); - states[get_pm_cur_state()].trans(EVENT_INPUT); -} - void lcd_on_direct(enum device_flags flags) { enum hal_device_power_transition_reason reason; @@ -1502,7 +1495,7 @@ static int display_probe(void *data) dp->config = &display_conf; init_display_states(dp); setup_display_plugin_backlight_ops(dp); - dp->set_dim_state = set_dim_state; + dp->set_dim_state = NULL; dp->get_device_flags = NULL; setup_display_plugin_backlight_ops(dp); diff --git a/plugins/tv/display/core.c b/plugins/tv/display/core.c index 25ef935..968eae4 100644 --- a/plugins/tv/display/core.c +++ b/plugins/tv/display/core.c @@ -366,13 +366,6 @@ static void update_display_locktime(int time) update_display_time(); } -void set_dim_state(bool on) -{ - _I("Dim state is %d.", on); - update_display_time(); - states[get_pm_cur_state()].trans(EVENT_INPUT); -} - void lcd_on_direct(enum device_flags flags) { enum hal_device_power_transition_reason reason; @@ -1493,7 +1486,7 @@ static int display_probe(void *data) dp->config = &display_conf; init_display_states(dp); setup_display_plugin_backlight_ops(dp); - dp->set_dim_state = set_dim_state; + dp->set_dim_state = NULL; dp->get_device_flags = NULL; setup_display_plugin_backlight_ops(dp); diff --git a/plugins/wearable/display/core.c b/plugins/wearable/display/core.c index 34a86a2..7fa444b 100644 --- a/plugins/wearable/display/core.c +++ b/plugins/wearable/display/core.c @@ -661,7 +661,7 @@ static void update_display_locktime(int time) update_display_time(); } -void set_dim_state(bool on) +static void set_dim_state(bool on) { _I("Dim state is %d.", on); update_display_time(); -- 2.7.4