panel/innolux-p079zca: Use refcounted allocation in place of devm_kzalloc()

Move to using the new API devm_drm_panel_alloc() to allocate the
panel.

Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Signed-off-by: Anusha Srivatsa <asrivats@redhat.com>
Link: https://lore.kernel.org/r/20250520-drivers-mass-convert-part2-v3-12-f7ae7b723c68@redhat.com
Signed-off-by: Maxime Ripard <mripard@kernel.org>
This commit is contained in:
Anusha Srivatsa 2025-05-20 22:03:43 -05:00 committed by Maxime Ripard
parent 93b6d2ea6f
commit 8015bc283e
No known key found for this signature in database
GPG key ID: 275FCE19A23DBE76

View file

@ -382,9 +382,11 @@ static int innolux_panel_add(struct mipi_dsi_device *dsi,
struct device *dev = &dsi->dev; struct device *dev = &dsi->dev;
int err, i; int err, i;
innolux = devm_kzalloc(dev, sizeof(*innolux), GFP_KERNEL); innolux = devm_drm_panel_alloc(dev, struct innolux_panel, base,
if (!innolux) &innolux_panel_funcs,
return -ENOMEM; DRM_MODE_CONNECTOR_DSI);
if (IS_ERR(innolux))
return PTR_ERR(innolux);
innolux->desc = desc; innolux->desc = desc;
@ -410,9 +412,6 @@ static int innolux_panel_add(struct mipi_dsi_device *dsi,
innolux->enable_gpio = NULL; innolux->enable_gpio = NULL;
} }
drm_panel_init(&innolux->base, dev, &innolux_panel_funcs,
DRM_MODE_CONNECTOR_DSI);
err = drm_panel_of_backlight(&innolux->base); err = drm_panel_of_backlight(&innolux->base);
if (err) if (err)
return err; return err;