Message ID | 20231117194405.1386265-5-macroalpha82@gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | Elida KD35T133 Panel Improvements | expand |
On 17/11/2023 20:44, Chris Morgan wrote: > From: Chris Morgan <macromorgan@hotmail.com> > > The driver shutdown is duplicate as it calls drm_unprepare and > drm_disable which are called anyway when associated drivers are > shutdown/removed. > > Signed-off-by: Chris Morgan <macromorgan@hotmail.com> > --- > drivers/gpu/drm/panel/panel-elida-kd35t133.c | 17 ----------------- > 1 file changed, 17 deletions(-) > > diff --git a/drivers/gpu/drm/panel/panel-elida-kd35t133.c b/drivers/gpu/drm/panel/panel-elida-kd35t133.c > index 29b4ee63d83b..fea3d9e84905 100644 > --- a/drivers/gpu/drm/panel/panel-elida-kd35t133.c > +++ b/drivers/gpu/drm/panel/panel-elida-kd35t133.c > @@ -296,27 +296,11 @@ static int kd35t133_probe(struct mipi_dsi_device *dsi) > return 0; > } > > -static void kd35t133_shutdown(struct mipi_dsi_device *dsi) > -{ > - struct kd35t133 *ctx = mipi_dsi_get_drvdata(dsi); > - int ret; > - > - ret = drm_panel_unprepare(&ctx->panel); > - if (ret < 0) > - dev_err(&dsi->dev, "Failed to unprepare panel: %d\n", ret); > - > - ret = drm_panel_disable(&ctx->panel); > - if (ret < 0) > - dev_err(&dsi->dev, "Failed to disable panel: %d\n", ret); > -} > - > static void kd35t133_remove(struct mipi_dsi_device *dsi) > { > struct kd35t133 *ctx = mipi_dsi_get_drvdata(dsi); > int ret; > > - kd35t133_shutdown(dsi); > - > ret = mipi_dsi_detach(dsi); > if (ret < 0) > dev_err(&dsi->dev, "Failed to detach from DSI host: %d\n", ret); > @@ -337,7 +321,6 @@ static struct mipi_dsi_driver kd35t133_driver = { > }, > .probe = kd35t133_probe, > .remove = kd35t133_remove, > - .shutdown = kd35t133_shutdown, > }; > module_mipi_dsi_driver(kd35t133_driver); > Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
diff --git a/drivers/gpu/drm/panel/panel-elida-kd35t133.c b/drivers/gpu/drm/panel/panel-elida-kd35t133.c index 29b4ee63d83b..fea3d9e84905 100644 --- a/drivers/gpu/drm/panel/panel-elida-kd35t133.c +++ b/drivers/gpu/drm/panel/panel-elida-kd35t133.c @@ -296,27 +296,11 @@ static int kd35t133_probe(struct mipi_dsi_device *dsi) return 0; } -static void kd35t133_shutdown(struct mipi_dsi_device *dsi) -{ - struct kd35t133 *ctx = mipi_dsi_get_drvdata(dsi); - int ret; - - ret = drm_panel_unprepare(&ctx->panel); - if (ret < 0) - dev_err(&dsi->dev, "Failed to unprepare panel: %d\n", ret); - - ret = drm_panel_disable(&ctx->panel); - if (ret < 0) - dev_err(&dsi->dev, "Failed to disable panel: %d\n", ret); -} - static void kd35t133_remove(struct mipi_dsi_device *dsi) { struct kd35t133 *ctx = mipi_dsi_get_drvdata(dsi); int ret; - kd35t133_shutdown(dsi); - ret = mipi_dsi_detach(dsi); if (ret < 0) dev_err(&dsi->dev, "Failed to detach from DSI host: %d\n", ret); @@ -337,7 +321,6 @@ static struct mipi_dsi_driver kd35t133_driver = { }, .probe = kd35t133_probe, .remove = kd35t133_remove, - .shutdown = kd35t133_shutdown, }; module_mipi_dsi_driver(kd35t133_driver);