diff options
| author | Anusha Srivatsa <asrivats@redhat.com> | 2025-05-20 22:03:37 -0500 |
|---|---|---|
| committer | Maxime Ripard <mripard@kernel.org> | 2025-05-21 08:40:58 +0200 |
| commit | 9609efa05d5ec63de5e758571f1bb85bdec93561 (patch) | |
| tree | 48339c4ae5aa9a6379cd949446e52b95692e9b79 | |
| parent | c53c3e87aeb7fc288dcb9dbdb22451e8721771e1 (diff) | |
| download | kernel-9609efa05d5ec63de5e758571f1bb85bdec93561.tar.gz | |
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>
| -rw-r--r-- | drivers/gpu/drm/panel/panel-ilitek-ili9322.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/gpu/drm/panel/panel-ilitek-ili9322.c b/drivers/gpu/drm/panel/panel-ilitek-ili9322.c index 94b7dfef3b5e..6ed544a83bdd 100644 --- a/drivers/gpu/drm/panel/panel-ilitek-ili9322.c +++ b/drivers/gpu/drm/panel/panel-ilitek-ili9322.c @@ -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; |
