Skip to content

Commit 450afd9

Browse files
skitthdeller
authored andcommitted
fbdev: omapfb: panel-dsi-cm: 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] Cc: [email protected] Reviewed-by: Daniel Thompson <[email protected]> Signed-off-by: Helge Deller <[email protected]>
1 parent 1cc1759 commit 450afd9

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

drivers/video/fbdev/omap2/omapfb/displays/panel-dsi-cm.c

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -331,13 +331,7 @@ static int dsicm_bl_update_status(struct backlight_device *dev)
331331
struct panel_drv_data *ddata = dev_get_drvdata(&dev->dev);
332332
struct omap_dss_device *in = ddata->in;
333333
int r;
334-
int level;
335-
336-
if (dev->props.fb_blank == FB_BLANK_UNBLANK &&
337-
dev->props.power == FB_BLANK_UNBLANK)
338-
level = dev->props.brightness;
339-
else
340-
level = 0;
334+
int level = backlight_get_brightness(dev);
341335

342336
dev_dbg(&ddata->pdev->dev, "update brightness to %d\n", level);
343337

0 commit comments

Comments
 (0)