Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Sam Ravnborg and committed by
Lee Jones
a00a5feb de7b490c

+1 -1
+1 -1
drivers/video/backlight/jornada720_bl.c
··· 54 54 jornada_ssp_start(); 55 55 56 56 /* If backlight is off then really turn it off */ 57 - if ((bd->props.power != FB_BLANK_UNBLANK) || (bd->props.fb_blank != FB_BLANK_UNBLANK)) { 57 + if (backlight_is_blank(bd)) { 58 58 ret = jornada_ssp_byte(BRIGHTNESSOFF); 59 59 if (ret != TXDUMMY) { 60 60 dev_info(&bd->dev, "brightness off timeout\n");