Commit a00a5feb authored by Sam Ravnborg's avatar Sam Ravnborg Committed by Lee Jones

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: default avatarSam Ravnborg <sam@ravnborg.org>
Reviewed-by: default avatarDaniel Thompson <daniel.thompson@linaro.org>
Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
parent de7b490c
......@@ -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");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment