[PATCH 04/10] panel/auo-a030jtn01: Use refcounted allocation in place of devm_kzalloc()
Maxime Ripard
mripard at kernel.org
Tue Apr 8 12:48:18 UTC 2025
On Mon, Apr 07, 2025 at 06:49:23PM +0300, Imre Deak wrote:
> Hi,
>
> On Tue, Apr 01, 2025 at 12:03:47PM -0400, Anusha Srivatsa wrote:
> > Move to using the new API devm_drm_panel_alloc() to allocate the
> > panel.
> >
> > Signed-off-by: Anusha Srivatsa <asrivats at redhat.com>
> > ---
> > drivers/gpu/drm/panel/panel-auo-a030jtn01.c | 10 ++++------
> > 1 file changed, 4 insertions(+), 6 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/panel/panel-auo-a030jtn01.c b/drivers/gpu/drm/panel/panel-auo-a030jtn01.c
> > index 77604d6a4e72c915c40575be0e47810c90b4ed71..83529b1c2bac2e29f41efaf4028950214b056a95 100644
> > --- a/drivers/gpu/drm/panel/panel-auo-a030jtn01.c
> > +++ b/drivers/gpu/drm/panel/panel-auo-a030jtn01.c
> > @@ -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);
>
> This doesn't compile and (yet) it's pushed already to drm-tip. AFAIU
> it's supposed to be
> priv = devm_drm_panel_alloc(...);
>
I fixed it (and the other breakages) there:
https://lore.kernel.org/dri-devel/20250408122008.1676235-1-mripard@kernel.org/
Maxime
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20250408/399ac5ae/attachment.sig>
More information about the dri-devel
mailing list