From 5b03506f7f656adaed71972b0f8155d23028dbca Mon Sep 17 00:00:00 2001 From: Tao Huang Date: Fri, 25 Jun 2021 18:56:02 +0800 Subject: [PATCH] input: sensors: hall: mh248: drop FB_EARLY_EVENT_BLANK support Signed-off-by: Tao Huang Change-Id: I7287af4d8a8cb3e3f6cc10e92c23fffd17eb9fbd --- drivers/input/sensors/hall/mh248.c | 26 ++++++++++---------------- 1 file changed, 10 insertions(+), 16 deletions(-) diff --git a/drivers/input/sensors/hall/mh248.c b/drivers/input/sensors/hall/mh248.c index 63aabd6644c6..88ee00980514 100644 --- a/drivers/input/sensors/hall/mh248.c +++ b/drivers/input/sensors/hall/mh248.c @@ -52,23 +52,17 @@ static int hall_fb_notifier_callback(struct notifier_block *self, mh248 = container_of(self, struct mh248_para, fb_notif); + if (action != FB_EVENT_BLANK) + return NOTIFY_DONE; + mutex_lock(&mh248->ops_lock); - if (action == FB_EARLY_EVENT_BLANK) { - switch (*((int *)event->data)) { - case FB_BLANK_UNBLANK: - break; - default: - mh248->is_suspend = 1; - break; - } - } else if (action == FB_EVENT_BLANK) { - switch (*((int *)event->data)) { - case FB_BLANK_UNBLANK: - mh248->is_suspend = 0; - break; - default: - break; - } + switch (*((int *)event->data)) { + case FB_BLANK_UNBLANK: + mh248->is_suspend = 0; + break; + default: + mh248->is_suspend = 1; + break; } mutex_unlock(&mh248->ops_lock);