diff options
author | Sam Ravnborg <sam@ravnborg.org> | 2020-07-19 10:07:40 +0200 |
---|---|---|
committer | Lee Jones <lee.jones@linaro.org> | 2020-07-20 10:27:05 +0100 |
commit | a00a5feb1e96ff55c24131472db53dc56cc7570b (patch) | |
tree | 08a4b4afb1f1aed3a933b9855e14a593b958b7ea /drivers | |
parent | de7b490cdfe46e34e3eb567019b4e3b3747b5c0b (diff) |
backlight: jornada720_bl: Introduce backlight_is_blank()
Use the backlight_is_blank() helper to simplify the code a bit.
The jornada720_bl driver distinguish between backlight off
and brightness set to 0.
Thus this driver turn off backlight only when backlight_is_blank()
returns true.
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/video/backlight/jornada720_bl.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/video/backlight/jornada720_bl.c b/drivers/video/backlight/jornada720_bl.c index f0385f9cf9da..996f7ba3b373 100644 --- a/drivers/video/backlight/jornada720_bl.c +++ b/drivers/video/backlight/jornada720_bl.c @@ -54,7 +54,7 @@ static int jornada_bl_update_status(struct backlight_device *bd) jornada_ssp_start(); /* If backlight is off then really turn it off */ - if ((bd->props.power != FB_BLANK_UNBLANK) || (bd->props.fb_blank != FB_BLANK_UNBLANK)) { + if (backlight_is_blank(bd)) { ret = jornada_ssp_byte(BRIGHTNESSOFF); if (ret != TXDUMMY) { dev_info(&bd->dev, "brightness off timeout\n"); |