Commit 973fcf37 authored by Stephen Kitt's avatar Stephen Kitt Committed by Helge Deller

fbdev: mx3fb: 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: Helge Deller <deller@gmx.de>
Cc: linux-fbdev@vger.kernel.org
Cc: dri-devel@lists.freedesktop.org
Reviewed-by: default avatarDaniel Thompson <daniel.thompson@linaro.org>
Signed-off-by: default avatarHelge Deller <deller@gmx.de>
parent c28509ef
...@@ -283,12 +283,7 @@ static int mx3fb_bl_get_brightness(struct backlight_device *bl) ...@@ -283,12 +283,7 @@ static int mx3fb_bl_get_brightness(struct backlight_device *bl)
static int mx3fb_bl_update_status(struct backlight_device *bl) static int mx3fb_bl_update_status(struct backlight_device *bl)
{ {
struct mx3fb_data *fbd = bl_get_data(bl); struct mx3fb_data *fbd = bl_get_data(bl);
int brightness = bl->props.brightness; int brightness = backlight_get_brightness(bl);
if (bl->props.power != FB_BLANK_UNBLANK)
brightness = 0;
if (bl->props.fb_blank != FB_BLANK_UNBLANK)
brightness = 0;
fbd->backlight_level = (fbd->backlight_level & ~0xFF) | brightness; fbd->backlight_level = (fbd->backlight_level & ~0xFF) | brightness;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment