From: Douglas Anderson Date: Fri, 3 May 2024 21:32:45 +0000 (-0700) Subject: drm/panel: boe-tv101wum-nl6: Stop tracking prepared X-Git-Tag: configfs-6.13-2024-11-19~902^2~24^2~27 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=3c24e31c908eb12e99420ff33b74c01f045253fe;p=users%2Fhch%2Fconfigfs.git drm/panel: boe-tv101wum-nl6: Stop tracking prepared As talked about in commit d2aacaf07395 ("drm/panel: Check for already prepared/enabled in drm_panel"), we want to remove needless code from panel drivers that was storing and double-checking the prepared/enabled state. Even if someone was relying on the double-check before, that double-check is now in the core and not needed in individual drivers. Cc: Jitao Shi Cc: Cong Yang Acked-by: Linus Walleij Acked-by: Maxime Ripard Signed-off-by: Douglas Anderson Link: https://patchwork.freedesktop.org/patch/msgid/20240503143327.RFT.v2.4.Ib501f2eceb62016e09cfb17bca29bde0f605a567@changeid --- diff --git a/drivers/gpu/drm/panel/panel-boe-tv101wum-nl6.c b/drivers/gpu/drm/panel/panel-boe-tv101wum-nl6.c index f7beace455c3..8ab8cab83d5c 100644 --- a/drivers/gpu/drm/panel/panel-boe-tv101wum-nl6.c +++ b/drivers/gpu/drm/panel/panel-boe-tv101wum-nl6.c @@ -52,8 +52,6 @@ struct boe_panel { struct regulator *avee; struct regulator *avdd; struct gpio_desc *enable_gpio; - - bool prepared; }; static int boe_tv110c9m_init(struct boe_panel *boe) @@ -1399,9 +1397,6 @@ static int boe_panel_unprepare(struct drm_panel *panel) { struct boe_panel *boe = to_boe_panel(panel); - if (!boe->prepared) - return 0; - if (boe->desc->discharge_on_disable) { regulator_disable(boe->avee); regulator_disable(boe->avdd); @@ -1420,8 +1415,6 @@ static int boe_panel_unprepare(struct drm_panel *panel) regulator_disable(boe->pp3300); } - boe->prepared = false; - return 0; } @@ -1430,9 +1423,6 @@ static int boe_panel_prepare(struct drm_panel *panel) struct boe_panel *boe = to_boe_panel(panel); int ret; - if (boe->prepared) - return 0; - gpiod_set_value(boe->enable_gpio, 0); usleep_range(1000, 1500); @@ -1474,8 +1464,6 @@ static int boe_panel_prepare(struct drm_panel *panel) if (ret < 0) goto poweroff; - boe->prepared = true; - return 0; poweroff: