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 <[email protected]> Cc: Helge Deller <[email protected]> Cc: [email protected] Cc: [email protected] Reviewed-by: Daniel Thompson <[email protected]> Signed-off-by: Helge Deller <[email protected]>
1 parent c28509e commit 973fcf3

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

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)