[PATCH v2 1/3] drm/panel: ilitek-ili9881c: use devm_drm_panel_add()

From: Myeonghun Pak

Date: Thu Apr 23 2026 - 08:59:55 EST


Replace drm_panel_add()/drm_panel_remove() with devm_drm_panel_add()
now that drm-misc-next provides it. This keeps panel deregistration tied
to the device lifetime and removes the manual cleanup from the remove
callback.

Signed-off-by: Myeonghun Pak <mhun512@xxxxxxxxx>
---
drivers/gpu/drm/panel/panel-ilitek-ili9881c.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/panel/panel-ilitek-ili9881c.c b/drivers/gpu/drm/panel/panel-ilitek-ili9881c.c
index 0652cdb57d..bc3cd9a182 100644
--- a/drivers/gpu/drm/panel/panel-ilitek-ili9881c.c
+++ b/drivers/gpu/drm/panel/panel-ilitek-ili9881c.c
@@ -2590,7 +2590,9 @@ static int ili9881c_dsi_probe(struct mipi_dsi_device *dsi)
if (ret)
return ret;

- drm_panel_add(&ctx->panel);
+ ret = devm_drm_panel_add(&dsi->dev, &ctx->panel);
+ if (ret)
+ return dev_err_probe(&dsi->dev, ret, "Failed to add panel\n");

dsi->mode_flags = ctx->desc->mode_flags;
dsi->format = MIPI_DSI_FMT_RGB888;
@@ -2601,10 +2603,7 @@ static int ili9881c_dsi_probe(struct mipi_dsi_device *dsi)

static void ili9881c_dsi_remove(struct mipi_dsi_device *dsi)
{
- struct ili9881c *ctx = mipi_dsi_get_drvdata(dsi);
-
mipi_dsi_detach(dsi);
- drm_panel_remove(&ctx->panel);
}

static const struct ili9881c_desc lhr050h41_desc = {
--
2.47.1