diff mbox series

[33/33] backlight: simplify lcd notifier

Message ID 20190528090304.9388-34-daniel.vetter@ffwll.ch (mailing list archive)
State New, archived
Headers show
Series fbcon notifier begone v3! | expand

Commit Message

Daniel Vetter May 28, 2019, 9:03 a.m. UTC
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>
Cc: Lee Jones <lee.jones@linaro.org>
Cc: Daniel Thompson <daniel.thompson@linaro.org>
Cc: Jingoo Han <jingoohan1@gmail.com>
---
 drivers/video/backlight/lcd.c | 11 -----------
 1 file changed, 11 deletions(-)

Comments

Daniel Thompson June 11, 2019, 2:11 p.m. UTC | #1
On Tue, May 28, 2019 at 11:03:04AM +0200, Daniel Vetter wrote:
> 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>
> Cc: Lee Jones <lee.jones@linaro.org>
> Cc: Daniel Thompson <daniel.thompson@linaro.org>
> Cc: Jingoo Han <jingoohan1@gmail.com>

Acked-by: Daniel Thompson <daniel.thompson@linaro.org>


> ---
>  drivers/video/backlight/lcd.c | 11 -----------
>  1 file changed, 11 deletions(-)
> 
> diff --git a/drivers/video/backlight/lcd.c b/drivers/video/backlight/lcd.c
> index ecdda06989d0..d6b653aa4ee9 100644
> --- a/drivers/video/backlight/lcd.c
> +++ b/drivers/video/backlight/lcd.c
> @@ -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;
> -- 
> 2.20.1
>
diff mbox series

Patch

diff --git a/drivers/video/backlight/lcd.c b/drivers/video/backlight/lcd.c
index ecdda06989d0..d6b653aa4ee9 100644
--- a/drivers/video/backlight/lcd.c
+++ b/drivers/video/backlight/lcd.c
@@ -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;