mirror of
https://github.com/torvalds/linux.git
synced 2024-12-14 15:13:52 +00:00
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>
This commit is contained in:
parent
de7b490cdf
commit
a00a5feb1e
@ -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");
|
||||
|
Loading…
Reference in New Issue
Block a user