mirror of
https://github.com/torvalds/linux.git
synced 2026-05-31 18:43:33 +02:00
panel/novatek-nt35510: 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-23-f7ae7b723c68@redhat.com Signed-off-by: Maxime Ripard <mripard@kernel.org>
This commit is contained in:
parent
5d5da5cef9
commit
3f08c356b8
|
|
@ -1087,9 +1087,12 @@ static int nt35510_probe(struct mipi_dsi_device *dsi)
|
|||
struct nt35510 *nt;
|
||||
int ret;
|
||||
|
||||
nt = devm_kzalloc(dev, sizeof(struct nt35510), GFP_KERNEL);
|
||||
if (!nt)
|
||||
return -ENOMEM;
|
||||
nt = devm_drm_panel_alloc(dev, struct nt35510, panel,
|
||||
&nt35510_drm_funcs,
|
||||
DRM_MODE_CONNECTOR_DSI);
|
||||
if (IS_ERR(nt))
|
||||
return PTR_ERR(nt);
|
||||
|
||||
mipi_dsi_set_drvdata(dsi, nt);
|
||||
nt->dev = dev;
|
||||
|
||||
|
|
@ -1142,9 +1145,6 @@ static int nt35510_probe(struct mipi_dsi_device *dsi)
|
|||
return PTR_ERR(nt->reset_gpio);
|
||||
}
|
||||
|
||||
drm_panel_init(&nt->panel, dev, &nt35510_drm_funcs,
|
||||
DRM_MODE_CONNECTOR_DSI);
|
||||
|
||||
/*
|
||||
* First, try to locate an external backlight (such as on GPIO)
|
||||
* if this fails, assume we will want to use the internal backlight
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user