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

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

authored by

Anusha Srivatsa and committed by
Maxime Ripard
8015bc28 93b6d2ea

+5 -6
+5 -6
drivers/gpu/drm/panel/panel-innolux-p079zca.c
··· 382 382 struct device *dev = &dsi->dev; 383 383 int err, i; 384 384 385 - innolux = devm_kzalloc(dev, sizeof(*innolux), GFP_KERNEL); 386 - if (!innolux) 387 - return -ENOMEM; 385 + innolux = devm_drm_panel_alloc(dev, struct innolux_panel, base, 386 + &innolux_panel_funcs, 387 + DRM_MODE_CONNECTOR_DSI); 388 + if (IS_ERR(innolux)) 389 + return PTR_ERR(innolux); 388 390 389 391 innolux->desc = desc; 390 392 ··· 411 409 dev_dbg(dev, "failed to get enable gpio: %d\n", err); 412 410 innolux->enable_gpio = NULL; 413 411 } 414 - 415 - drm_panel_init(&innolux->base, dev, &innolux_panel_funcs, 416 - DRM_MODE_CONNECTOR_DSI); 417 412 418 413 err = drm_panel_of_backlight(&innolux->base); 419 414 if (err)