Skip to content

Commit 5b3fc99

Browse files
skitthdeller
authored andcommitted
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]>
1 parent b7bfaa7 commit 5b3fc99

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

drivers/video/fbdev/aty/aty128fb.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1766,12 +1766,10 @@ static int aty128_bl_update_status(struct backlight_device *bd)
17661766
unsigned int reg = aty_ld_le32(LVDS_GEN_CNTL);
17671767
int level;
17681768

1769-
if (bd->props.power != FB_BLANK_UNBLANK ||
1770-
bd->props.fb_blank != FB_BLANK_UNBLANK ||
1771-
!par->lcd_on)
1769+
if (!par->lcd_on)
17721770
level = 0;
17731771
else
1774-
level = bd->props.brightness;
1772+
level = backlight_get_brightness(bd);
17751773

17761774
reg |= LVDS_BL_MOD_EN | LVDS_BLON;
17771775
if (level > 0) {

0 commit comments

Comments
 (0)