Skip to content

Commit 846a7ae

Browse files
AngeloGioacchino Del RegnoChun-Kuang Hu
authored andcommitted
drm/mediatek: mtk_dpi: Switch to devm_drm_of_get_bridge()
Function drm_of_find_panel_or_bridge() is marked as deprecated: since the usage of that in this driver exactly corresponds to the new function devm_drm_of_get_bridge(), switch to it. Signed-off-by: AngeloGioacchino Del Regno <[email protected]> Reviewed-by: Fei Shao <[email protected]> Reviewed-by: CK Hu <[email protected]> Link: https://patchwork.kernel.org/project/dri-devel/patch/[email protected]/ Signed-off-by: Chun-Kuang Hu <[email protected]>
1 parent be47140 commit 846a7ae

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

drivers/gpu/drm/mediatek/mtk_dpi.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1063,10 +1063,10 @@ static int mtk_dpi_probe(struct platform_device *pdev)
10631063
if (dpi->irq <= 0)
10641064
return -EINVAL;
10651065

1066-
ret = drm_of_find_panel_or_bridge(dev->of_node, 0, 0,
1067-
NULL, &dpi->next_bridge);
1068-
if (ret)
1069-
return ret;
1066+
dpi->next_bridge = devm_drm_of_get_bridge(dev, dev->of_node, 0, 0);
1067+
if (IS_ERR(dpi->next_bridge))
1068+
return dev_err_probe(dev, PTR_ERR(dpi->next_bridge),
1069+
"Failed to get bridge\n");
10701070

10711071
dev_info(dev, "Found bridge node: %pOF\n", dpi->next_bridge->of_node);
10721072

0 commit comments

Comments
 (0)