aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/backlight/hp680_bl.c
diff options
context:
space:
mode:
authorSam Ravnborg <sam@ravnborg.org>2020-07-19 10:07:41 +0200
committerLee Jones <lee.jones@linaro.org>2020-07-20 10:27:06 +0100
commit51d53e5b06b8e75d02a17bfe678e7be7554a2322 (patch)
tree890ce583f0e0b89cecec269aae786e1b4b7e841b /drivers/video/backlight/hp680_bl.c
parentbacklight: jornada720_bl: Introduce backlight_is_blank() (diff)
downloadlinux-dev-51d53e5b06b8e75d02a17bfe678e7be7554a2322.tar.xz
linux-dev-51d53e5b06b8e75d02a17bfe678e7be7554a2322.zip
backlight: Use backlight_get_brightness() throughout
Introduce the backlight_get_brightness() helper in all video/backlight/* drivers. This simplifies the code and align the implementation of the update_status() operation across the different backlight drivers. Some of the drivers gains a little extra functionality by the change as they now respect the fb_blank() ioctl. 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/video/backlight/hp680_bl.c')
-rw-r--r--drivers/video/backlight/hp680_bl.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/video/backlight/hp680_bl.c b/drivers/video/backlight/hp680_bl.c
index 8ea42b8d9bc8..9123c33def05 100644
--- a/drivers/video/backlight/hp680_bl.c
+++ b/drivers/video/backlight/hp680_bl.c
@@ -33,12 +33,8 @@ static void hp680bl_send_intensity(struct backlight_device *bd)
{
unsigned long flags;
u16 v;
- int intensity = bd->props.brightness;
+ int intensity = backlight_get_brightness(bd);
- if (bd->props.power != FB_BLANK_UNBLANK)
- intensity = 0;
- if (bd->props.fb_blank != FB_BLANK_UNBLANK)
- intensity = 0;
if (hp680bl_suspended)
intensity = 0;