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

panel/raydium-rm692e5: 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-5-5d75a3711e40@redhat.com
Signed-off-by: Maxime Ripard <mripard@kernel.org>

authored by

Anusha Srivatsa and committed by
Maxime Ripard
7a0c1de1 20291d8f

+5 -5
+5 -5
drivers/gpu/drm/panel/panel-raydium-rm692e5.c
··· 281 281 struct rm692e5_panel *ctx; 282 282 int ret; 283 283 284 - ctx = devm_kzalloc(dev, sizeof(*ctx), GFP_KERNEL); 285 - if (!ctx) 286 - return -ENOMEM; 284 + ctx = devm_drm_panel_alloc(dev, struct rm692e5_panel, panel, 285 + &rm692e5_panel_funcs, 286 + DRM_MODE_CONNECTOR_DSI); 287 + if (IS_ERR(ctx)) 288 + return PTR_ERR(ctx); 287 289 288 290 ctx->supplies[0].supply = "vddio"; 289 291 ctx->supplies[1].supply = "dvdd"; ··· 308 306 dsi->mode_flags = MIPI_DSI_MODE_NO_EOT_PACKET | 309 307 MIPI_DSI_CLOCK_NON_CONTINUOUS; 310 308 311 - drm_panel_init(&ctx->panel, dev, &rm692e5_panel_funcs, 312 - DRM_MODE_CONNECTOR_DSI); 313 309 ctx->panel.prepare_prev_first = true; 314 310 315 311 ctx->panel.backlight = rm692e5_create_backlight(dsi);