[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220607192335.1137249-7-steve@sk2.org>
Date: Tue, 7 Jun 2022 21:23:34 +0200
From: Stephen Kitt <steve@....org>
To: Antonino Daplas <adaplas@...il.com>,
Benjamin Herrenschmidt <benh@...nel.crashing.org>,
Helge Deller <deller@....de>, Paul Mackerras <paulus@...ba.org>
Cc: linux-fbdev@...r.kernel.org, linux-kernel@...r.kernel.org,
Stephen Kitt <steve@....org>, linux-omap@...r.kernel.org,
dri-devel@...ts.freedesktop.org
Subject: [PATCH 6/7] 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@....org>
Cc: Helge Deller <deller@....de>
Cc: linux-omap@...r.kernel.org
Cc: linux-fbdev@...r.kernel.org
Cc: dri-devel@...ts.freedesktop.org
---
drivers/video/fbdev/omap2/omapfb/displays/panel-dsi-cm.c | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/drivers/video/fbdev/omap2/omapfb/displays/panel-dsi-cm.c b/drivers/video/fbdev/omap2/omapfb/displays/panel-dsi-cm.c
index a2c7c5cb1523..236430b5dc52 100644
--- a/drivers/video/fbdev/omap2/omapfb/displays/panel-dsi-cm.c
+++ b/drivers/video/fbdev/omap2/omapfb/displays/panel-dsi-cm.c
@@ -331,13 +331,7 @@ static int dsicm_bl_update_status(struct backlight_device *dev)
struct panel_drv_data *ddata = dev_get_drvdata(&dev->dev);
struct omap_dss_device *in = ddata->in;
int r;
- int level;
-
- if (dev->props.fb_blank == FB_BLANK_UNBLANK &&
- dev->props.power == FB_BLANK_UNBLANK)
- level = dev->props.brightness;
- else
- level = 0;
+ int level = backlight_get_brightness(dev);
dev_dbg(&ddata->pdev->dev, "update brightness to %d\n", level);
--
2.30.2
Powered by blists - more mailing lists