mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-05 16:54:27 +00:00
panel/auo-a030jtn01: Use refcounted allocation in place of devm_kzalloc()
Move to using the new API devm_drm_panel_alloc() to allocate the panel. Signed-off-by: Anusha Srivatsa <asrivats@redhat.com> Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org> Link: https://lore.kernel.org/r/20250401-b4-drm-panel-mass-driver-convert-v1-4-cdd7615e1f93@redhat.com Signed-off-by: Maxime Ripard <mripard@kernel.org>
This commit is contained in:
parent
d816d1af0f
commit
9d7d7c3c9a
1 changed files with 4 additions and 6 deletions
|
@ -200,9 +200,10 @@ static int a030jtn01_probe(struct spi_device *spi)
|
|||
|
||||
spi->mode |= SPI_MODE_3 | SPI_3WIRE;
|
||||
|
||||
priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL);
|
||||
if (!priv)
|
||||
return -ENOMEM;
|
||||
panel = devm_drm_panel_alloc(dev, struct a030jtn01, panel,
|
||||
&a030jtn01_funcs, DRM_MODE_CONNECTOR_DPI);
|
||||
if (IS_ERR(panel))
|
||||
return PTR_ERR(panel);
|
||||
|
||||
priv->spi = spi;
|
||||
spi_set_drvdata(spi, priv);
|
||||
|
@ -223,9 +224,6 @@ static int a030jtn01_probe(struct spi_device *spi)
|
|||
if (IS_ERR(priv->reset_gpio))
|
||||
return dev_err_probe(dev, PTR_ERR(priv->reset_gpio), "Failed to get reset GPIO");
|
||||
|
||||
drm_panel_init(&priv->panel, dev, &a030jtn01_funcs,
|
||||
DRM_MODE_CONNECTOR_DPI);
|
||||
|
||||
err = drm_panel_of_backlight(&priv->panel);
|
||||
if (err)
|
||||
return err;
|
||||
|
|
Loading…
Add table
Reference in a new issue