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

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

authored by

Anusha Srivatsa and committed by
Maxime Ripard
1017366d 39cfc68b

+4 -6
+4 -6
drivers/gpu/drm/panel/panel-feiyang-fy07024di26a30d.c
··· 189 189 struct feiyang *ctx; 190 190 int ret; 191 191 192 - ctx = devm_kzalloc(&dsi->dev, sizeof(*ctx), GFP_KERNEL); 193 - if (!ctx) 194 - return -ENOMEM; 192 + ctx = devm_drm_panel_alloc(&dsi->dev, struct feiyang, panel, 193 + &feiyang_funcs, DRM_MODE_CONNECTOR_DSI); 194 + if (IS_ERR(ctx)) 195 + return PTR_ERR(ctx); 195 196 196 197 mipi_dsi_set_drvdata(dsi, ctx); 197 198 ctx->dsi = dsi; 198 - 199 - drm_panel_init(&ctx->panel, &dsi->dev, &feiyang_funcs, 200 - DRM_MODE_CONNECTOR_DSI); 201 199 202 200 ctx->dvdd = devm_regulator_get(&dsi->dev, "dvdd"); 203 201 if (IS_ERR(ctx->dvdd))