Skip to content

Commit 1535ec9

Browse files
skitthdeller
authored andcommitted
fbdev: atyfb: 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: Helge Deller <[email protected]> Cc: [email protected] Cc: [email protected] Reviewed-by: Daniel Thompson <[email protected]> Signed-off-by: Helge Deller <[email protected]>
1 parent 5b3fc99 commit 1535ec9

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

drivers/video/fbdev/aty/atyfb_base.c

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2219,13 +2219,7 @@ static int aty_bl_update_status(struct backlight_device *bd)
22192219
{
22202220
struct atyfb_par *par = bl_get_data(bd);
22212221
unsigned int reg = aty_ld_lcd(LCD_MISC_CNTL, par);
2222-
int level;
2223-
2224-
if (bd->props.power != FB_BLANK_UNBLANK ||
2225-
bd->props.fb_blank != FB_BLANK_UNBLANK)
2226-
level = 0;
2227-
else
2228-
level = bd->props.brightness;
2222+
int level = backlight_get_brightness(bd);
22292223

22302224
reg |= (BLMOD_EN | BIASMOD_EN);
22312225
if (level > 0) {

0 commit comments

Comments
 (0)