mirror of
https://github.com/torvalds/linux.git
synced 2026-05-25 15:41:52 +02:00
panel/orisetech-ota5601a: 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-30-f7ae7b723c68@redhat.com Signed-off-by: Maxime Ripard <mripard@kernel.org>
This commit is contained in:
parent
d2b67baa89
commit
bdfc5b2927
|
|
@ -237,9 +237,11 @@ static int ota5601a_probe(struct spi_device *spi)
|
|||
struct ota5601a *panel;
|
||||
int err;
|
||||
|
||||
panel = devm_kzalloc(dev, sizeof(*panel), GFP_KERNEL);
|
||||
if (!panel)
|
||||
return -ENOMEM;
|
||||
panel = devm_drm_panel_alloc(dev, struct ota5601a, drm_panel,
|
||||
&ota5601a_funcs,
|
||||
DRM_MODE_CONNECTOR_DPI);
|
||||
if (IS_ERR(panel))
|
||||
return PTR_ERR(panel);
|
||||
|
||||
spi_set_drvdata(spi, panel);
|
||||
|
||||
|
|
@ -273,9 +275,6 @@ static int ota5601a_probe(struct spi_device *spi)
|
|||
return PTR_ERR(panel->map);
|
||||
}
|
||||
|
||||
drm_panel_init(&panel->drm_panel, dev, &ota5601a_funcs,
|
||||
DRM_MODE_CONNECTOR_DPI);
|
||||
|
||||
err = drm_panel_of_backlight(&panel->drm_panel);
|
||||
if (err) {
|
||||
if (err != -EPROBE_DEFER)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user