mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-07-16 17:57:38 -04:00
panel/synaptics-r63353: 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-33-5d75a3711e40@redhat.com Signed-off-by: Maxime Ripard <mripard@kernel.org>
This commit is contained in:
committed by
Maxime Ripard
parent
7bd1d88ca0
commit
827337818c
@@ -229,9 +229,11 @@ static int r63353_panel_probe(struct mipi_dsi_device *dsi)
|
||||
struct device *dev = &dsi->dev;
|
||||
struct r63353_panel *panel;
|
||||
|
||||
panel = devm_kzalloc(&dsi->dev, sizeof(*panel), GFP_KERNEL);
|
||||
if (!panel)
|
||||
return -ENOMEM;
|
||||
panel = devm_drm_panel_alloc(dev, struct r63353_panel, base,
|
||||
&r63353_panel_funcs,
|
||||
DRM_MODE_CONNECTOR_DSI);
|
||||
if (IS_ERR(panel))
|
||||
return PTR_ERR(panel);
|
||||
|
||||
mipi_dsi_set_drvdata(dsi, panel);
|
||||
panel->dsi = dsi;
|
||||
@@ -258,9 +260,6 @@ static int r63353_panel_probe(struct mipi_dsi_device *dsi)
|
||||
return PTR_ERR(panel->reset_gpio);
|
||||
}
|
||||
|
||||
drm_panel_init(&panel->base, dev, &r63353_panel_funcs,
|
||||
DRM_MODE_CONNECTOR_DSI);
|
||||
|
||||
panel->base.prepare_prev_first = true;
|
||||
ret = drm_panel_of_backlight(&panel->base);
|
||||
if (ret)
|
||||
|
||||
Reference in New Issue
Block a user