mirror of
https://github.com/torvalds/linux.git
synced 2026-05-31 18:43:33 +02:00
panel/magnachip-d53e6ea8966: 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-19-f7ae7b723c68@redhat.com Signed-off-by: Maxime Ripard <mripard@kernel.org>
This commit is contained in:
parent
b28994ed38
commit
2a2c7d7d36
|
|
@ -370,9 +370,11 @@ static int d53e6ea8966_probe(struct spi_device *spi)
|
|||
.node = NULL,
|
||||
};
|
||||
|
||||
db = devm_kzalloc(dev, sizeof(*db), GFP_KERNEL);
|
||||
if (!db)
|
||||
return -ENOMEM;
|
||||
db = devm_drm_panel_alloc(dev, struct d53e6ea8966, panel,
|
||||
&d53e6ea8966_panel_funcs,
|
||||
DRM_MODE_CONNECTOR_DSI);
|
||||
if (IS_ERR(db))
|
||||
return PTR_ERR(db);
|
||||
|
||||
spi_set_drvdata(spi, db);
|
||||
|
||||
|
|
@ -425,9 +427,6 @@ static int d53e6ea8966_probe(struct spi_device *spi)
|
|||
db->dsi_dev->mode_flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_BURST |
|
||||
MIPI_DSI_MODE_LPM | MIPI_DSI_MODE_NO_EOT_PACKET;
|
||||
|
||||
drm_panel_init(&db->panel, dev, &d53e6ea8966_panel_funcs,
|
||||
DRM_MODE_CONNECTOR_DSI);
|
||||
|
||||
if (db->panel_info->backlight_register) {
|
||||
ret = db->panel_info->backlight_register(db);
|
||||
if (ret < 0)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user