mirror of
https://github.com/torvalds/linux.git
synced 2026-06-02 19:43:40 +02:00
panel/innolux-ej030na: 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-11-f7ae7b723c68@redhat.com Signed-off-by: Maxime Ripard <mripard@kernel.org>
This commit is contained in:
parent
0678c17add
commit
93b6d2ea6f
|
|
@ -204,9 +204,11 @@ static int ej030na_probe(struct spi_device *spi)
|
|||
struct ej030na *priv;
|
||||
int err;
|
||||
|
||||
priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL);
|
||||
if (!priv)
|
||||
return -ENOMEM;
|
||||
priv = devm_drm_panel_alloc(dev, struct ej030na, panel,
|
||||
&ej030na_funcs,
|
||||
DRM_MODE_CONNECTOR_DPI);
|
||||
if (IS_ERR(priv))
|
||||
return PTR_ERR(priv);
|
||||
|
||||
priv->spi = spi;
|
||||
spi_set_drvdata(spi, priv);
|
||||
|
|
@ -231,9 +233,6 @@ static int ej030na_probe(struct spi_device *spi)
|
|||
return dev_err_probe(dev, PTR_ERR(priv->reset_gpio),
|
||||
"Failed to get reset GPIO\n");
|
||||
|
||||
drm_panel_init(&priv->panel, dev, &ej030na_funcs,
|
||||
DRM_MODE_CONNECTOR_DPI);
|
||||
|
||||
err = drm_panel_of_backlight(&priv->panel);
|
||||
if (err)
|
||||
return err;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user