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

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

authored by

Anusha Srivatsa and committed by
Maxime Ripard
608cd288 9d20a286

+5 -5
+5 -5
drivers/gpu/drm/panel/panel-jdi-fhd-r63452.c
··· 175 175 struct jdi_fhd_r63452 *ctx; 176 176 int ret; 177 177 178 - ctx = devm_kzalloc(dev, sizeof(*ctx), GFP_KERNEL); 179 - if (!ctx) 180 - return -ENOMEM; 178 + ctx = devm_drm_panel_alloc(dev, struct jdi_fhd_r63452, panel, 179 + &jdi_fhd_r63452_panel_funcs, 180 + DRM_MODE_CONNECTOR_DSI); 181 + if (IS_ERR(ctx)) 182 + return PTR_ERR(ctx); 181 183 182 184 ctx->reset_gpio = devm_gpiod_get(dev, "reset", GPIOD_OUT_HIGH); 183 185 if (IS_ERR(ctx->reset_gpio)) ··· 194 192 dsi->mode_flags = MIPI_DSI_MODE_VIDEO_BURST | 195 193 MIPI_DSI_CLOCK_NON_CONTINUOUS; 196 194 197 - drm_panel_init(&ctx->panel, dev, &jdi_fhd_r63452_panel_funcs, 198 - DRM_MODE_CONNECTOR_DSI); 199 195 ctx->panel.prepare_prev_first = true; 200 196 201 197 ret = drm_panel_of_backlight(&ctx->panel);