On 5/9/2025 1:59 AM, Neil Armstrong wrote:
Switch to devm_drm_panel_alloc() to add panel refcounting.

Signed-off-by: Neil Armstrong <neil.armstr...@linaro.org>

Reviewed-by: Jessica Zhang <quic_jessz...@quicinc.com>

---
  drivers/gpu/drm/panel/panel-visionox-rm69299.c | 6 +++---
  1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/panel/panel-visionox-rm69299.c 
b/drivers/gpu/drm/panel/panel-visionox-rm69299.c
index 
fe921d5fb1942c47c5b849e827c244d7fbde25a3..fda1caa9052dd1c61c2dc23934d5faa8a52a6e31
 100644
--- a/drivers/gpu/drm/panel/panel-visionox-rm69299.c
+++ b/drivers/gpu/drm/panel/panel-visionox-rm69299.c
@@ -167,7 +167,9 @@ static int visionox_rm69299_probe(struct mipi_dsi_device 
*dsi)
        struct visionox_rm69299 *ctx;
        int ret;
- ctx = devm_kzalloc(dev, sizeof(*ctx), GFP_KERNEL);
+       ctx = devm_drm_panel_alloc(dev, struct visionox_rm69299, panel,
+                                  &visionox_rm69299_drm_funcs,
+                                  DRM_MODE_CONNECTOR_DSI);
        if (!ctx)
                return -ENOMEM;
@@ -190,8 +192,6 @@ static int visionox_rm69299_probe(struct mipi_dsi_device *dsi)
                return PTR_ERR(ctx->reset_gpio);
        }
- drm_panel_init(&ctx->panel, dev, &visionox_rm69299_drm_funcs,
-                      DRM_MODE_CONNECTOR_DSI);
        drm_panel_add(&ctx->panel);
dsi->lanes = 4;


Reply via email to