mirror of
https://github.com/torvalds/linux.git
synced 2026-05-21 05:18:45 +02:00
panel/panel-summit: 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/20250529-b4-drm_panel_mass_driver_convert_part3-v2-32-5d75a3711e40@redhat.com Signed-off-by: Maxime Ripard <mripard@kernel.org>
This commit is contained in:
parent
064864d375
commit
7bd1d88ca0
|
|
@ -68,9 +68,11 @@ static int summit_probe(struct mipi_dsi_device *dsi)
|
|||
struct summit_data *s_data;
|
||||
int ret;
|
||||
|
||||
s_data = devm_kzalloc(dev, sizeof(*s_data), GFP_KERNEL);
|
||||
if (!s_data)
|
||||
return -ENOMEM;
|
||||
s_data = devm_drm_panel_alloc(dev, struct summit_data, panel,
|
||||
&summit_panel_funcs,
|
||||
DRM_MODE_CONNECTOR_DSI);
|
||||
if (IS_ERR(s_data))
|
||||
return PTR_ERR(s_data);
|
||||
|
||||
mipi_dsi_set_drvdata(dsi, s_data);
|
||||
s_data->dsi = dsi;
|
||||
|
|
@ -85,8 +87,6 @@ static int summit_probe(struct mipi_dsi_device *dsi)
|
|||
if (IS_ERR(s_data->bl))
|
||||
return PTR_ERR(s_data->bl);
|
||||
|
||||
drm_panel_init(&s_data->panel, dev, &summit_panel_funcs,
|
||||
DRM_MODE_CONNECTOR_DSI);
|
||||
drm_panel_add(&s_data->panel);
|
||||
|
||||
return mipi_dsi_attach(dsi);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user