mirror of
https://github.com/torvalds/linux.git
synced 2026-05-30 01:53:29 +02:00
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>
This commit is contained in:
parent
c53c3e87ae
commit
9609efa05d
|
|
@ -722,9 +722,10 @@ static int ili9322_probe(struct spi_device *spi)
|
|||
int ret;
|
||||
int i;
|
||||
|
||||
ili = devm_kzalloc(dev, sizeof(struct ili9322), GFP_KERNEL);
|
||||
if (!ili)
|
||||
return -ENOMEM;
|
||||
ili = devm_drm_panel_alloc(dev, struct ili9322, panel,
|
||||
&ili9322_drm_funcs, DRM_MODE_CONNECTOR_DPI);
|
||||
if (IS_ERR(ili))
|
||||
return PTR_ERR(ili);
|
||||
|
||||
spi_set_drvdata(spi, ili);
|
||||
|
||||
|
|
@ -883,9 +884,6 @@ static int ili9322_probe(struct spi_device *spi)
|
|||
ili->input = ili->conf->input;
|
||||
}
|
||||
|
||||
drm_panel_init(&ili->panel, dev, &ili9322_drm_funcs,
|
||||
DRM_MODE_CONNECTOR_DPI);
|
||||
|
||||
drm_panel_add(&ili->panel);
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user