mirror of
https://github.com/torvalds/linux.git
synced 2026-05-28 00:53:34 +02:00
panel/novatek-nt36523: 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-26-f7ae7b723c68@redhat.com Signed-off-by: Maxime Ripard <mripard@kernel.org>
This commit is contained in:
parent
e59e1f4524
commit
10868521bd
|
|
@ -1171,9 +1171,11 @@ static int nt36523_probe(struct mipi_dsi_device *dsi)
|
|||
const struct mipi_dsi_device_info *info;
|
||||
int i, ret;
|
||||
|
||||
pinfo = devm_kzalloc(dev, sizeof(*pinfo), GFP_KERNEL);
|
||||
if (!pinfo)
|
||||
return -ENOMEM;
|
||||
pinfo = devm_drm_panel_alloc(dev, struct panel_info, panel,
|
||||
&nt36523_panel_funcs,
|
||||
DRM_MODE_CONNECTOR_DSI);
|
||||
if (IS_ERR(pinfo))
|
||||
return PTR_ERR(pinfo);
|
||||
|
||||
pinfo->vddio = devm_regulator_get(dev, "vddio");
|
||||
if (IS_ERR(pinfo->vddio))
|
||||
|
|
@ -1211,7 +1213,6 @@ static int nt36523_probe(struct mipi_dsi_device *dsi)
|
|||
|
||||
pinfo->dsi[0] = dsi;
|
||||
mipi_dsi_set_drvdata(dsi, pinfo);
|
||||
drm_panel_init(&pinfo->panel, dev, &nt36523_panel_funcs, DRM_MODE_CONNECTOR_DSI);
|
||||
|
||||
ret = of_drm_get_panel_orientation(dev->of_node, &pinfo->orientation);
|
||||
if (ret < 0) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user