mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-02-15 09:44:21 -05:00
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>
This commit is contained in:
committed by
Maxime Ripard
parent
417f0eb92c
commit
5d5da5cef9
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user