Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

panel/sony-acx565akm: 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/20250529-b4-drm_panel_mass_driver_convert_part3-v2-29-5d75a3711e40@redhat.com
Signed-off-by: Maxime Ripard <mripard@kernel.org>

authored by

Anusha Srivatsa and committed by
Maxime Ripard
cd268f8f 9176f33f

+4 -6
+4 -6
drivers/gpu/drm/panel/panel-sony-acx565akm.c
··· 607 607 struct acx565akm_panel *lcd; 608 608 int ret; 609 609 610 - lcd = devm_kzalloc(&spi->dev, sizeof(*lcd), GFP_KERNEL); 611 - if (!lcd) 612 - return -ENOMEM; 610 + lcd = devm_drm_panel_alloc(&spi->dev, struct acx565akm_panel, panel, 611 + &acx565akm_funcs, DRM_MODE_CONNECTOR_DPI); 612 + if (IS_ERR(lcd)) 613 + return PTR_ERR(lcd); 613 614 614 615 spi_set_drvdata(spi, lcd); 615 616 spi->mode = SPI_MODE_3; ··· 635 634 if (ret < 0) 636 635 return ret; 637 636 } 638 - 639 - drm_panel_init(&lcd->panel, &lcd->spi->dev, &acx565akm_funcs, 640 - DRM_MODE_CONNECTOR_DPI); 641 637 642 638 drm_panel_add(&lcd->panel); 643 639