[PATCH v5 16/19] backlight: jornada720_bl: introduce backlight_is_blank()
Sam Ravnborg
sam at ravnborg.org
Sun Jul 19 08:07:40 UTC 2020
Use the backlight_is_blank() helper to simplify the code a bit.
The jornada720_bl driver distingush between backlight off
and brightness set to 0.
Thus this driver turn off backlight only when backlight_is_blank()
returns true.
v2:
- Updated changelog (Daniel)
Signed-off-by: Sam Ravnborg <sam at ravnborg.org>
Reviewed-by: Daniel Thompson <daniel.thompson at linaro.org>
Cc: Lee Jones <lee.jones at linaro.org>
Cc: Daniel Thompson <daniel.thompson at linaro.org>
Cc: Jingoo Han <jingoohan1 at gmail.com>
---
drivers/video/backlight/jornada720_bl.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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");
--
2.25.1
More information about the dri-devel
mailing list