summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorMeghana Madhyastha <meghana.madhyastha@gmail.com>2018-01-24 16:40:12 +0000
committerSean Paul <seanpaul@chromium.org>2018-02-20 11:07:22 -0500
commitf4ccc2b5767c3246826f40fdf166112aa376af8c (patch)
tree12af1e36d132b1f8ee90e765344f0ea7edfbca1b /drivers
parentd593bfdb62951313132b626b0fa5b3889335a108 (diff)
downloadblackbird-obmc-linux-f4ccc2b5767c3246826f40fdf166112aa376af8c.tar.gz
blackbird-obmc-linux-f4ccc2b5767c3246826f40fdf166112aa376af8c.zip
drm/omapdrm: Use backlight_enable/disable helpers
Use backlight_enable/disable helpers instead of changing the property and calling backlight_update_status for cleaner and simpler code and also to avoid repetitions. Reviewed-by: Noralf Trønnes <noralf@tronnes.org> Reviewed-by: Sean Paul <seanpaul@chromium.org> Signed-off-by: Meghana Madhyastha <meghana.madhyastha@gmail.com> Signed-off-by: Sean Paul <seanpaul@chromium.org> Link: https://patchwork.freedesktop.org/patch/msgid/30d5b26c3c7d75de3d2ab3cff9dee67084fc3caf.1516810725.git.meghana.madhyastha@gmail.com
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpu/drm/omapdrm/displays/panel-dpi.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/drivers/gpu/drm/omapdrm/displays/panel-dpi.c b/drivers/gpu/drm/omapdrm/displays/panel-dpi.c
index efff6dbbb86f..2d8b0a3ebd30 100644
--- a/drivers/gpu/drm/omapdrm/displays/panel-dpi.c
+++ b/drivers/gpu/drm/omapdrm/displays/panel-dpi.c
@@ -87,11 +87,7 @@ static int panel_dpi_enable(struct omap_dss_device *dssdev)
}
gpiod_set_value_cansleep(ddata->enable_gpio, 1);
-
- if (ddata->backlight) {
- ddata->backlight->props.power = FB_BLANK_UNBLANK;
- backlight_update_status(ddata->backlight);
- }
+ backlight_enable(ddata->backlight);
dssdev->state = OMAP_DSS_DISPLAY_ACTIVE;
@@ -106,10 +102,7 @@ static void panel_dpi_disable(struct omap_dss_device *dssdev)
if (!omapdss_device_is_enabled(dssdev))
return;
- if (ddata->backlight) {
- ddata->backlight->props.power = FB_BLANK_POWERDOWN;
- backlight_update_status(ddata->backlight);
- }
+ backlight_disable(ddata->backlight);
gpiod_set_value_cansleep(ddata->enable_gpio, 0);
regulator_disable(ddata->vcc_supply);
OpenPOWER on IntegriCloud