diff mbox

[v3,07/12] drm/panel: otm8009a: Remove enabled state

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

Commit Message

Sean Paul Oct. 17, 2017, 9:13 p.m. UTC
It's not necessary for atomic drivers, and drm_panel will
WARN if the calls are unbalanced.

Signed-off-by: Sean Paul <seanpaul@chromium.org>
---
No changes since v1

 drivers/gpu/drm/panel/panel-orisetech-otm8009a.c | 16 ----------------
 1 file changed, 16 deletions(-)
diff mbox

Patch

diff --git a/drivers/gpu/drm/panel/panel-orisetech-otm8009a.c b/drivers/gpu/drm/panel/panel-orisetech-otm8009a.c
index c189cd6329c8..0a5898fd4502 100644
--- a/drivers/gpu/drm/panel/panel-orisetech-otm8009a.c
+++ b/drivers/gpu/drm/panel/panel-orisetech-otm8009a.c
@@ -63,7 +63,6 @@  struct otm8009a {
 	struct backlight_device *bl_dev;
 	struct gpio_desc *reset_gpio;
 	bool prepared;
-	bool enabled;
 };
 
 static const struct drm_display_mode default_mode = {
@@ -243,9 +242,6 @@  static int otm8009a_disable(struct drm_panel *panel)
 	struct mipi_dsi_device *dsi = to_mipi_dsi_device(ctx->dev);
 	int ret;
 
-	if (!ctx->enabled)
-		return 0; /* This is not an issue so we return 0 here */
-
 	/* Power off the backlight. Note: end-user still controls brightness */
 	ctx->bl_dev->props.power = FB_BLANK_POWERDOWN;
 	ret = backlight_update_status(ctx->bl_dev);
@@ -262,8 +258,6 @@  static int otm8009a_disable(struct drm_panel *panel)
 
 	msleep(120);
 
-	ctx->enabled = false;
-
 	return 0;
 }
 
@@ -316,15 +310,6 @@  static int otm8009a_prepare(struct drm_panel *panel)
 	return 0;
 }
 
-static int otm8009a_enable(struct drm_panel *panel)
-{
-	struct otm8009a *ctx = panel_to_otm8009a(panel);
-
-	ctx->enabled = true;
-
-	return 0;
-}
-
 static int otm8009a_get_modes(struct drm_panel *panel)
 {
 	struct drm_display_mode *mode;
@@ -352,7 +337,6 @@  static const struct drm_panel_funcs otm8009a_drm_funcs = {
 	.disable   = otm8009a_disable,
 	.unprepare = otm8009a_unprepare,
 	.prepare   = otm8009a_prepare,
-	.enable    = otm8009a_enable,
 	.get_modes = otm8009a_get_modes,
 };