Commit 5b3fc998 authored by Stephen Kitt's avatar Stephen Kitt Committed by Helge Deller
Browse files

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: default avatarStephen Kitt <steve@sk2.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Helge Deller <deller@gmx.de>
Cc: linux-fbdev@vger.kernel.org
Cc: dri-devel@lists.freedesktop.org
Reviewed-by: default avatarSam Ravnborg <sam@ravnborg.org>
Reviewed-by: default avatarDaniel Thompson <daniel.thompson@linaro.org>
Signed-off-by: default avatarHelge Deller <deller@gmx.de>
parent b7bfaa76
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -1766,12 +1766,10 @@ static int aty128_bl_update_status(struct backlight_device *bd)
	unsigned int reg = aty_ld_le32(LVDS_GEN_CNTL);
	int level;

	if (bd->props.power != FB_BLANK_UNBLANK ||
	    bd->props.fb_blank != FB_BLANK_UNBLANK ||
	    !par->lcd_on)
	if (!par->lcd_on)
		level = 0;
	else
		level = bd->props.brightness;
		level = backlight_get_brightness(bd);

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