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
This commit is contained in:

committed by
Sean Paul

parent
27f6640c8f
commit
d593bfdb62
@@ -117,10 +117,7 @@ static int sharp_nt_panel_disable(struct drm_panel *panel)
|
||||
if (!sharp_nt->enabled)
|
||||
return 0;
|
||||
|
||||
if (sharp_nt->backlight) {
|
||||
sharp_nt->backlight->props.power = FB_BLANK_POWERDOWN;
|
||||
backlight_update_status(sharp_nt->backlight);
|
||||
}
|
||||
backlight_disable(sharp_nt->backlight);
|
||||
|
||||
sharp_nt->enabled = false;
|
||||
|
||||
@@ -203,10 +200,7 @@ static int sharp_nt_panel_enable(struct drm_panel *panel)
|
||||
if (sharp_nt->enabled)
|
||||
return 0;
|
||||
|
||||
if (sharp_nt->backlight) {
|
||||
sharp_nt->backlight->props.power = FB_BLANK_UNBLANK;
|
||||
backlight_update_status(sharp_nt->backlight);
|
||||
}
|
||||
backlight_enable(sharp_nt->backlight);
|
||||
|
||||
sharp_nt->enabled = true;
|
||||
|
||||
|
Reference in New Issue
Block a user