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

panel/himax-hx83112a: 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-4-f7ae7b723c68@redhat.com
Signed-off-by: Maxime Ripard <mripard@kernel.org>

authored by

Anusha Srivatsa and committed by
Maxime Ripard
7b8c3296 1017366d

+5 -5
+5 -5
drivers/gpu/drm/panel/panel-himax-hx83112a.c
··· 269 269 struct hx83112a_panel *ctx; 270 270 int ret; 271 271 272 - ctx = devm_kzalloc(dev, sizeof(*ctx), GFP_KERNEL); 273 - if (!ctx) 274 - return -ENOMEM; 272 + ctx = devm_drm_panel_alloc(dev, struct hx83112a_panel, panel, 273 + &hx83112a_panel_funcs, 274 + DRM_MODE_CONNECTOR_DSI); 275 + if (IS_ERR(ctx)) 276 + return PTR_ERR(ctx); 275 277 276 278 ctx->supplies[0].supply = "vdd1"; 277 279 ctx->supplies[1].supply = "vsn"; ··· 297 295 MIPI_DSI_MODE_VIDEO_HSE | 298 296 MIPI_DSI_CLOCK_NON_CONTINUOUS; 299 297 300 - drm_panel_init(&ctx->panel, dev, &hx83112a_panel_funcs, 301 - DRM_MODE_CONNECTOR_DSI); 302 298 ctx->panel.prepare_prev_first = true; 303 299 304 300 ret = drm_panel_of_backlight(&ctx->panel);