Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

panel/visionox-vtdr6130: 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/20250529-b4-drm_panel_mass_driver_convert_part3-v2-40-5d75a3711e40@redhat.com
Signed-off-by: Maxime Ripard <mripard@kernel.org>

authored by

Anusha Srivatsa and committed by
Maxime Ripard
9d104921 5eebde53

+5 -6
+5 -6
drivers/gpu/drm/panel/panel-visionox-vtdr6130.c
··· 248 248 struct visionox_vtdr6130 *ctx; 249 249 int ret; 250 250 251 - ctx = devm_kzalloc(dev, sizeof(*ctx), GFP_KERNEL); 252 - if (!ctx) 253 - return -ENOMEM; 251 + ctx = devm_drm_panel_alloc(dev, struct visionox_vtdr6130, panel, 252 + &visionox_vtdr6130_panel_funcs, 253 + DRM_MODE_CONNECTOR_DSI); 254 + if (IS_ERR(ctx)) 255 + return PTR_ERR(ctx); 254 256 255 257 ret = devm_regulator_bulk_get_const(&dsi->dev, 256 258 ARRAY_SIZE(visionox_vtdr6130_supplies), ··· 274 272 dsi->mode_flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_NO_EOT_PACKET | 275 273 MIPI_DSI_CLOCK_NON_CONTINUOUS; 276 274 ctx->panel.prepare_prev_first = true; 277 - 278 - drm_panel_init(&ctx->panel, dev, &visionox_vtdr6130_panel_funcs, 279 - DRM_MODE_CONNECTOR_DSI); 280 275 281 276 ctx->panel.backlight = visionox_vtdr6130_create_backlight(dsi); 282 277 if (IS_ERR(ctx->panel.backlight))