summaryrefslogtreecommitdiffstats
path: root/drivers/gpu
diff options
context:
space:
mode:
authorAnusha Srivatsa <asrivats@redhat.com>2025-05-20 22:03:53 -0500
committerMaxime Ripard <mripard@kernel.org>2025-05-21 08:41:07 +0200
commit5d5da5cef9bdabe455804eb000147ace298cde90 (patch)
tree4ba69181a4775e812b79cad834e8974a430be199 /drivers/gpu
parent417f0eb92c53fab6a9fdb4f09f9db6505bb7a735 (diff)
downloadlinux-5d5da5cef9bdabe455804eb000147ace298cde90.tar.gz
linux-5d5da5cef9bdabe455804eb000147ace298cde90.zip
panel/newvision-nv3052c: 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-22-f7ae7b723c68@redhat.com Signed-off-by: Maxime Ripard <mripard@kernel.org>
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/drm/panel/panel-newvision-nv3052c.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/gpu/drm/panel/panel-newvision-nv3052c.c b/drivers/gpu/drm/panel/panel-newvision-nv3052c.c
index 06e16a7c14a7..0db9cadd868e 100644
--- a/drivers/gpu/drm/panel/panel-newvision-nv3052c.c
+++ b/drivers/gpu/drm/panel/panel-newvision-nv3052c.c
@@ -777,9 +777,10 @@ static int nv3052c_probe(struct spi_device *spi)
struct nv3052c *priv;
int err;
- priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL);
- if (!priv)
- return -ENOMEM;
+ priv = devm_drm_panel_alloc(dev, struct nv3052c, panel, &nv3052c_funcs,
+ DRM_MODE_CONNECTOR_DPI);
+ if (IS_ERR(priv))
+ return PTR_ERR(priv);
priv->dev = dev;
@@ -803,9 +804,6 @@ static int nv3052c_probe(struct spi_device *spi)
spi_set_drvdata(spi, priv);
- drm_panel_init(&priv->panel, dev, &nv3052c_funcs,
- DRM_MODE_CONNECTOR_DPI);
-
err = drm_panel_of_backlight(&priv->panel);
if (err)
return dev_err_probe(dev, err, "Failed to attach backlight\n");