backlight: simplify lcd notifier
authorDaniel Vetter <daniel.vetter@ffwll.ch>
Tue, 28 May 2019 09:03:04 +0000 (11:03 +0200)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Thu, 13 Jun 2019 08:07:20 +0000 (10:07 +0200)
With all the work I've done on replacing fb notifier calls with direct
calls into fbcon the backlight/lcd notifier is the only user left.

It will only receive events now that it cares about, hence we can
remove this check.

Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Acked-by: Daniel Thompson <daniel.thompson@linaro.org>
Cc: Lee Jones <lee.jones@linaro.org>
Cc: Daniel Thompson <daniel.thompson@linaro.org>
Cc: Jingoo Han <jingoohan1@gmail.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190528090304.9388-34-daniel.vetter@ffwll.ch
drivers/video/backlight/lcd.c

index ecdda06989d0ed3fb6a7f30e0e9262b58d1be64b..d6b653aa4ee91d499acff47fe3356055f8f831f4 100644 (file)
@@ -30,17 +30,6 @@ static int fb_notifier_callback(struct notifier_block *self,
        struct lcd_device *ld;
        struct fb_event *evdata = data;
 
-       /* If we aren't interested in this event, skip it immediately ... */
-       switch (event) {
-       case FB_EVENT_BLANK:
-       case FB_EVENT_MODE_CHANGE:
-       case FB_EARLY_EVENT_BLANK:
-       case FB_R_EARLY_EVENT_BLANK:
-               break;
-       default:
-               return 0;
-       }
-
        ld = container_of(self, struct lcd_device, fb_notif);
        if (!ld->ops)
                return 0;