mirror of
https://github.com/torvalds/linux.git
synced 2026-05-28 09:04:39 +02:00
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>
This commit is contained in:
parent
39cfc68b6b
commit
1017366dd1
|
|
@ -189,16 +189,14 @@ static int feiyang_dsi_probe(struct mipi_dsi_device *dsi)
|
|||
struct feiyang *ctx;
|
||||
int ret;
|
||||
|
||||
ctx = devm_kzalloc(&dsi->dev, sizeof(*ctx), GFP_KERNEL);
|
||||
if (!ctx)
|
||||
return -ENOMEM;
|
||||
ctx = devm_drm_panel_alloc(&dsi->dev, struct feiyang, panel,
|
||||
&feiyang_funcs, DRM_MODE_CONNECTOR_DSI);
|
||||
if (IS_ERR(ctx))
|
||||
return PTR_ERR(ctx);
|
||||
|
||||
mipi_dsi_set_drvdata(dsi, ctx);
|
||||
ctx->dsi = dsi;
|
||||
|
||||
drm_panel_init(&ctx->panel, &dsi->dev, &feiyang_funcs,
|
||||
DRM_MODE_CONNECTOR_DSI);
|
||||
|
||||
ctx->dvdd = devm_regulator_get(&dsi->dev, "dvdd");
|
||||
if (IS_ERR(ctx->dvdd))
|
||||
return dev_err_probe(&dsi->dev, PTR_ERR(ctx->dvdd),
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user