mirror of
https://github.com/torvalds/linux.git
synced 2026-05-29 17:43:52 +02:00
panel/novatek-nt35950: 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-25-f7ae7b723c68@redhat.com Signed-off-by: Maxime Ripard <mripard@kernel.org>
This commit is contained in:
parent
81cb873542
commit
e59e1f4524
|
|
@ -449,9 +449,10 @@ static int nt35950_probe(struct mipi_dsi_device *dsi)
|
|||
const struct mipi_dsi_device_info *info;
|
||||
int i, num_dsis = 1, ret;
|
||||
|
||||
nt = devm_kzalloc(dev, sizeof(*nt), GFP_KERNEL);
|
||||
if (!nt)
|
||||
return -ENOMEM;
|
||||
nt = devm_drm_panel_alloc(dev, struct nt35950, panel, &nt35950_panel_funcs,
|
||||
DRM_MODE_CONNECTOR_DSI);
|
||||
if (IS_ERR(nt))
|
||||
return PTR_ERR(nt);
|
||||
|
||||
ret = nt35950_sharp_init_vregs(nt, dev);
|
||||
if (ret)
|
||||
|
|
@ -491,9 +492,6 @@ static int nt35950_probe(struct mipi_dsi_device *dsi)
|
|||
nt->dsi[0] = dsi;
|
||||
mipi_dsi_set_drvdata(dsi, nt);
|
||||
|
||||
drm_panel_init(&nt->panel, dev, &nt35950_panel_funcs,
|
||||
DRM_MODE_CONNECTOR_DSI);
|
||||
|
||||
ret = drm_panel_of_backlight(&nt->panel);
|
||||
if (ret) {
|
||||
if (num_dsis == 2)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user