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 <steve@sk2.org> Cc: Helge Deller <deller@gmx.de> Cc: linux-omap@vger.kernel.org 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 1cc1759 commit 450afd9

1 file changed

Lines changed: 1 addition & 7 deletions

File tree

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)