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

panel/ilitek-ili9322: 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-6-f7ae7b723c68@redhat.com
Signed-off-by: Maxime Ripard <mripard@kernel.org>

authored by

Anusha Srivatsa and committed by
Maxime Ripard
9609efa0 c53c3e87

+4 -6
+4 -6
drivers/gpu/drm/panel/panel-ilitek-ili9322.c
··· 722 722 int ret; 723 723 int i; 724 724 725 - ili = devm_kzalloc(dev, sizeof(struct ili9322), GFP_KERNEL); 726 - if (!ili) 727 - return -ENOMEM; 725 + ili = devm_drm_panel_alloc(dev, struct ili9322, panel, 726 + &ili9322_drm_funcs, DRM_MODE_CONNECTOR_DPI); 727 + if (IS_ERR(ili)) 728 + return PTR_ERR(ili); 728 729 729 730 spi_set_drvdata(spi, ili); 730 731 ··· 883 882 } else { 884 883 ili->input = ili->conf->input; 885 884 } 886 - 887 - drm_panel_init(&ili->panel, dev, &ili9322_drm_funcs, 888 - DRM_MODE_CONNECTOR_DPI); 889 885 890 886 drm_panel_add(&ili->panel); 891 887