Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

fbdev: riva: 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: Antonino Daplas <adaplas@gmail.com>
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>

authored by

Stephen Kitt and committed by
Helge Deller
8791906e 450afd92

+1 -7
+1 -7
drivers/video/fbdev/riva/fbdev.c
··· 293 293 { 294 294 struct riva_par *par = bl_get_data(bd); 295 295 U032 tmp_pcrt, tmp_pmc; 296 - int level; 297 - 298 - if (bd->props.power != FB_BLANK_UNBLANK || 299 - bd->props.fb_blank != FB_BLANK_UNBLANK) 300 - level = 0; 301 - else 302 - level = bd->props.brightness; 296 + int level = backlight_get_brightness(bd); 303 297 304 298 tmp_pmc = NV_RD32(par->riva.PMC, 0x10F0) & 0x0000FFFF; 305 299 tmp_pcrt = NV_RD32(par->riva.PCRTC0, 0x081C) & 0xFFFFFFFC;