diff options
author | Meghana Madhyastha <meghana.madhyastha@gmail.com> | 2018-01-24 19:39:27 +0300 |
---|---|---|
committer | Sean Paul <seanpaul@chromium.org> | 2018-02-20 19:07:22 +0300 |
commit | d593bfdb62951313132b626b0fa5b3889335a108 (patch) | |
tree | 77a8a2baf73d55de8e582043bb05dc5f60404f42 /drivers/gpu/drm/panel/panel-sharp-lq101r1sx01.c | |
parent | 27f6640c8fa0adf5ea686189126dc2cd4642f21d (diff) | |
download | linux-d593bfdb62951313132b626b0fa5b3889335a108.tar.xz |
drm/panel: 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>
Acked-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Meghana Madhyastha <meghana.madhyastha@gmail.com>
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Link: https://patchwork.freedesktop.org/patch/msgid/bc80cdb5cf1a6638dce9fb9f8da674e361e3b749.1516810725.git.meghana.madhyastha@gmail.com
Diffstat (limited to 'drivers/gpu/drm/panel/panel-sharp-lq101r1sx01.c')
-rw-r--r-- | drivers/gpu/drm/panel/panel-sharp-lq101r1sx01.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/drivers/gpu/drm/panel/panel-sharp-lq101r1sx01.c b/drivers/gpu/drm/panel/panel-sharp-lq101r1sx01.c index 3cce3ca19601..072c0fc794d6 100644 --- a/drivers/gpu/drm/panel/panel-sharp-lq101r1sx01.c +++ b/drivers/gpu/drm/panel/panel-sharp-lq101r1sx01.c @@ -96,10 +96,7 @@ static int sharp_panel_disable(struct drm_panel *panel) if (!sharp->enabled) return 0; - if (sharp->backlight) { - sharp->backlight->props.power = FB_BLANK_POWERDOWN; - backlight_update_status(sharp->backlight); - } + backlight_disable(sharp->backlight); sharp->enabled = false; @@ -263,10 +260,7 @@ static int sharp_panel_enable(struct drm_panel *panel) if (sharp->enabled) return 0; - if (sharp->backlight) { - sharp->backlight->props.power = FB_BLANK_UNBLANK; - backlight_update_status(sharp->backlight); - } + backlight_enable(sharp->backlight); sharp->enabled = true; |