Skip to content

Commit c28509e

Browse files
skitthdeller
authored andcommitted
fbdev: radeon: 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: Benjamin Herrenschmidt <[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 1535ec9 commit c28509e

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

drivers/video/fbdev/aty/radeon_backlight.c

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,11 +57,7 @@ static int radeon_bl_update_status(struct backlight_device *bd)
5757
* backlight. This provides some greater power saving and the display
5858
* is useless without backlight anyway.
5959
*/
60-
if (bd->props.power != FB_BLANK_UNBLANK ||
61-
bd->props.fb_blank != FB_BLANK_UNBLANK)
62-
level = 0;
63-
else
64-
level = bd->props.brightness;
60+
level = backlight_get_brightness(bd);
6561

6662
del_timer_sync(&rinfo->lvds_timer);
6763
radeon_engine_idle();

0 commit comments

Comments
 (0)