diff options
author | Stephen Kitt <steve@sk2.org> | 2022-06-07 21:23:31 +0200 |
---|---|---|
committer | Helge Deller <deller@gmx.de> | 2023-01-09 09:57:50 +0100 |
commit | c28509ef9c221378a586e72643fc43102f5512e9 (patch) | |
tree | 0a1880b58d097611acd2b0e345018d15abdac7b3 | |
parent | 1535ec976414d2ea8d29d40da6b5b99c91e0f2bf (diff) | |
download | linux-stable-c28509ef9c221378a586e72643fc43102f5512e9.tar.gz linux-stable-c28509ef9c221378a586e72643fc43102f5512e9.tar.bz2 linux-stable-c28509ef9c221378a586e72643fc43102f5512e9.zip |
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 <steve@sk2.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Helge Deller <deller@gmx.de>
Cc: linux-fbdev@vger.kernel.org
Cc: dri-devel@lists.freedesktop.org
Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org>
Signed-off-by: Helge Deller <deller@gmx.de>
-rw-r--r-- | drivers/video/fbdev/aty/radeon_backlight.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/video/fbdev/aty/radeon_backlight.c b/drivers/video/fbdev/aty/radeon_backlight.c index d2c1263ad260..427adc838f77 100644 --- a/drivers/video/fbdev/aty/radeon_backlight.c +++ b/drivers/video/fbdev/aty/radeon_backlight.c @@ -57,11 +57,7 @@ static int radeon_bl_update_status(struct backlight_device *bd) * backlight. This provides some greater power saving and the display * is useless without backlight anyway. */ - if (bd->props.power != FB_BLANK_UNBLANK || - bd->props.fb_blank != FB_BLANK_UNBLANK) - level = 0; - else - level = bd->props.brightness; + level = backlight_get_brightness(bd); del_timer_sync(&rinfo->lvds_timer); radeon_engine_idle(); |