diff options
author | Stephen Kitt <[email protected]> | 2022-06-07 21:23:29 +0200 |
---|---|---|
committer | Helge Deller <[email protected]> | 2023-01-09 09:57:50 +0100 |
commit | 5b3fc9988d1e4be268d834c2aaae85c75fa34253 (patch) | |
tree | c605a181fd5cb704758353d063d05bf57ee3dfba | |
parent | b7bfaa761d760e72a969d116517eaa12e404c262 (diff) |
fbdev: aty128fb: Use backlight helper
Instead of retrieving the backlight brightness in struct
backlight_properties manually, and then checking whether the backlight
should be on at all, use backlight_get_brightness() which does all
this and insulates this from future changes.
Signed-off-by: Stephen Kitt <[email protected]>
Cc: Paul Mackerras <[email protected]>
Cc: Helge Deller <[email protected]>
Cc: [email protected]
Cc: [email protected]
Reviewed-by: Sam Ravnborg <[email protected]>
Reviewed-by: Daniel Thompson <[email protected]>
Signed-off-by: Helge Deller <[email protected]>
-rw-r--r-- | drivers/video/fbdev/aty/aty128fb.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/video/fbdev/aty/aty128fb.c b/drivers/video/fbdev/aty/aty128fb.c index dd31b9d7d337..36a9ac05a340 100644 --- a/drivers/video/fbdev/aty/aty128fb.c +++ b/drivers/video/fbdev/aty/aty128fb.c @@ -1766,12 +1766,10 @@ static int aty128_bl_update_status(struct backlight_device *bd) unsigned int reg = aty_ld_le32(LVDS_GEN_CNTL); int level; - if (bd->props.power != FB_BLANK_UNBLANK || - bd->props.fb_blank != FB_BLANK_UNBLANK || - !par->lcd_on) + if (!par->lcd_on) level = 0; else - level = bd->props.brightness; + level = backlight_get_brightness(bd); reg |= LVDS_BL_MOD_EN | LVDS_BLON; if (level > 0) { |