From 498f833e38ac639fb4d31b0aee326633c75e2d44 Mon Sep 17 00:00:00 2001 From: youngjae Date: Thu, 1 Jun 2023 19:08:27 +0900 Subject: [PATCH] display: Remove unused code of key-filter Change-Id: Ia90ae16241bfc1bf2c0a427210d03552657d9a3c Signed-off-by: youngjae --- plugins/iot-headed/display/key-filter.c | 2 -- plugins/mobile/display/key-filter.c | 2 -- plugins/tv/display/key-filter.c | 2 -- plugins/wearable/display/key-filter.c | 2 -- src/display/core.h | 2 -- src/display/plugin-common/display-dbus.c | 19 ++----------------- 6 files changed, 2 insertions(+), 27 deletions(-) diff --git a/plugins/iot-headed/display/key-filter.c b/plugins/iot-headed/display/key-filter.c index 9bf578a..0bf71c9 100644 --- a/plugins/iot-headed/display/key-filter.c +++ b/plugins/iot-headed/display/key-filter.c @@ -794,8 +794,6 @@ static void key_backlight_enable(bool enable) static const struct display_keyfilter_ops normal_keyfilter_ops = { .init = keyfilter_init, .check = check_key_filter, - .set_powerkey_ignore = NULL, - .powerkey_lcdoff = NULL, .backlight_enable = key_backlight_enable, }; diff --git a/plugins/mobile/display/key-filter.c b/plugins/mobile/display/key-filter.c index 7edd460..97a2454 100644 --- a/plugins/mobile/display/key-filter.c +++ b/plugins/mobile/display/key-filter.c @@ -820,8 +820,6 @@ static void key_backlight_enable(bool enable) static const struct display_keyfilter_ops normal_keyfilter_ops = { .init = keyfilter_init, .check = check_key_filter, - .set_powerkey_ignore = NULL, - .powerkey_lcdoff = NULL, .backlight_enable = key_backlight_enable, }; diff --git a/plugins/tv/display/key-filter.c b/plugins/tv/display/key-filter.c index 790ad0a..b2c0c10 100644 --- a/plugins/tv/display/key-filter.c +++ b/plugins/tv/display/key-filter.c @@ -788,8 +788,6 @@ static void key_backlight_enable(bool enable) static const struct display_keyfilter_ops normal_keyfilter_ops = { .init = keyfilter_init, .check = check_key_filter, - .set_powerkey_ignore = NULL, - .powerkey_lcdoff = NULL, .backlight_enable = key_backlight_enable, }; diff --git a/plugins/wearable/display/key-filter.c b/plugins/wearable/display/key-filter.c index 88a736d..cf14122 100644 --- a/plugins/wearable/display/key-filter.c +++ b/plugins/wearable/display/key-filter.c @@ -722,8 +722,6 @@ static void keyfilter_init(void) static const struct display_keyfilter_ops normal_keyfilter_ops = { .init = keyfilter_init, .check = check_key_filter, - .set_powerkey_ignore = NULL, - .powerkey_lcdoff = NULL, .backlight_enable = NULL, }; diff --git a/src/display/core.h b/src/display/core.h index fb1be24..2b99608 100644 --- a/src/display/core.h +++ b/src/display/core.h @@ -101,8 +101,6 @@ struct display_keyfilter_ops { void (*init)(void); void (*exit)(void); int (*check)(void *, int); - void (*set_powerkey_ignore)(int); - int (*powerkey_lcdoff)(void); void (*backlight_enable)(bool); }; diff --git a/src/display/plugin-common/display-dbus.c b/src/display/plugin-common/display-dbus.c index 0acaf1a..1994bc4 100644 --- a/src/display/plugin-common/display-dbus.c +++ b/src/display/plugin-common/display-dbus.c @@ -817,29 +817,14 @@ static GVariant *dbus_powerkeyignore(GDBusConnection *conn, const gchar *sender, const gchar *path, const gchar *iface, const gchar *name, GVariant *param, GDBusMethodInvocation *invocation, gpointer user_data) { - int ret = 0; - int on; - - g_variant_get(param, "(i)", &on); - - if (CHECK_OPS(keyfilter_ops, set_powerkey_ignore)) - keyfilter_ops->set_powerkey_ignore(on == 1 ? true : false); - - return g_variant_new("(i)", ret); + return g_variant_new("(i)", 0); } static GVariant *dbus_powerkeylcdoff(GDBusConnection *conn, const gchar *sender, const gchar *path, const gchar *iface, const gchar *name, GVariant *param, GDBusMethodInvocation *invocation, gpointer user_data) { - int ret; - - if (CHECK_OPS(keyfilter_ops, powerkey_lcdoff)) - ret = keyfilter_ops->powerkey_lcdoff(); - else - ret = -ENOSYS; - - return g_variant_new("(i)", ret); + return g_variant_new("(i)", -ENOSYS); } static GVariant *dbus_customlcdon(GDBusConnection *conn, -- 2.7.4