diff mbox

[10/10] drm/panel: ls043t1le01: Remove enabled/prepared state

Message ID 20170921170638.27031-11-seanpaul@chromium.org (mailing list archive)
State New, archived
Headers show

Commit Message

Sean Paul Sept. 21, 2017, 5:06 p.m. UTC
They're not necessary for atomic drivers, and drm_panel will
WARN if the calls are unbalanced

Signed-off-by: Sean Paul <seanpaul@chromium.org>
---
 drivers/gpu/drm/panel/panel-sharp-ls043t1le01.c | 23 -----------------------
 1 file changed, 23 deletions(-)
diff mbox

Patch

diff --git a/drivers/gpu/drm/panel/panel-sharp-ls043t1le01.c b/drivers/gpu/drm/panel/panel-sharp-ls043t1le01.c
index 3aeb0bda4947..8d7843248556 100644
--- a/drivers/gpu/drm/panel/panel-sharp-ls043t1le01.c
+++ b/drivers/gpu/drm/panel/panel-sharp-ls043t1le01.c
@@ -39,9 +39,6 @@  struct sharp_nt_panel {
 	struct regulator *supply;
 	struct gpio_desc *reset_gpio;
 
-	bool prepared;
-	bool enabled;
-
 	const struct drm_display_mode *mode;
 };
 
@@ -114,16 +111,11 @@  static int sharp_nt_panel_disable(struct drm_panel *panel)
 {
 	struct sharp_nt_panel *sharp_nt = to_sharp_nt_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);
 	}
 
-	sharp_nt->enabled = false;
-
 	return 0;
 }
 
@@ -132,9 +124,6 @@  static int sharp_nt_panel_unprepare(struct drm_panel *panel)
 	struct sharp_nt_panel *sharp_nt = to_sharp_nt_panel(panel);
 	int ret;
 
-	if (!sharp_nt->prepared)
-		return 0;
-
 	ret = sharp_nt_panel_off(sharp_nt);
 	if (ret < 0) {
 		dev_err(panel->dev, "failed to set panel off: %d\n", ret);
@@ -145,8 +134,6 @@  static int sharp_nt_panel_unprepare(struct drm_panel *panel)
 	if (sharp_nt->reset_gpio)
 		gpiod_set_value(sharp_nt->reset_gpio, 0);
 
-	sharp_nt->prepared = false;
-
 	return 0;
 }
 
@@ -155,9 +142,6 @@  static int sharp_nt_panel_prepare(struct drm_panel *panel)
 	struct sharp_nt_panel *sharp_nt = to_sharp_nt_panel(panel);
 	int ret;
 
-	if (sharp_nt->prepared)
-		return 0;
-
 	ret = regulator_enable(sharp_nt->supply);
 	if (ret < 0)
 		return ret;
@@ -185,8 +169,6 @@  static int sharp_nt_panel_prepare(struct drm_panel *panel)
 		goto poweroff;
 	}
 
-	sharp_nt->prepared = true;
-
 	return 0;
 
 poweroff:
@@ -200,16 +182,11 @@  static int sharp_nt_panel_enable(struct drm_panel *panel)
 {
 	struct sharp_nt_panel *sharp_nt = to_sharp_nt_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);
 	}
 
-	sharp_nt->enabled = true;
-
 	return 0;
 }