Skip to content

Commit 973fcf3

Browse files
skitthdeller
authored andcommitted
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: Stephen Kitt <steve@sk2.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>
1 parent c28509e commit 973fcf3

1 file changed

Lines changed: 1 addition & 6 deletions

File tree

drivers/video/fbdev/mx3fb.c

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -283,12 +283,7 @@ static int mx3fb_bl_get_brightness(struct backlight_device *bl)
283283
static int mx3fb_bl_update_status(struct backlight_device *bl)
284284
{
285285
struct mx3fb_data *fbd = bl_get_data(bl);
286-
int brightness = bl->props.brightness;
287-
288-
if (bl->props.power != FB_BLANK_UNBLANK)
289-
brightness = 0;
290-
if (bl->props.fb_blank != FB_BLANK_UNBLANK)
291-
brightness = 0;
286+
int brightness = backlight_get_brightness(bl);
292287

293288
fbd->backlight_level = (fbd->backlight_level & ~0xFF) | brightness;
294289

0 commit comments

Comments
 (0)