[PATCH v3 3/6] drm/mediatek: mtk_dpi: Switch to devm_drm_of_get_bridge()
CK Hu (胡俊光)
ck.hu at mediatek.com
Wed Jul 26 20:24:41 PDT 2023
Hi, Angelo:
On Wed, 2023-07-26 at 10:22 +0200, AngeloGioacchino Del Regno wrote:
> 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.
Reviewed-by: CK Hu <ck.hu at mediatek.com>
>
> Signed-off-by: AngeloGioacchino Del Regno <
> angelogioacchino.delregno at collabora.com>
> Reviewed-by: Fei Shao <fshao at chromium.org>
> ---
> drivers/gpu/drm/mediatek/mtk_dpi.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/mediatek/mtk_dpi.c
> b/drivers/gpu/drm/mediatek/mtk_dpi.c
> index fdd5b7126e27..08822fe88c93 100644
> --- a/drivers/gpu/drm/mediatek/mtk_dpi.c
> +++ b/drivers/gpu/drm/mediatek/mtk_dpi.c
> @@ -1062,10 +1062,10 @@ static int mtk_dpi_probe(struct
> platform_device *pdev)
> if (dpi->irq <= 0)
> return -EINVAL;
>
> - ret = drm_of_find_panel_or_bridge(dev->of_node, 0, 0,
> - NULL, &dpi->next_bridge);
> - if (ret)
> - return ret;
> + dpi->next_bridge = devm_drm_of_get_bridge(dev, dev->of_node, 0,
> 0);
> + if (IS_ERR(dpi->next_bridge))
> + return dev_err_probe(dev, PTR_ERR(dpi->next_bridge),
> + "Failed to get bridge\n");
>
> dev_info(dev, "Found bridge node: %pOF\n", dpi->next_bridge-
> >of_node);
>
More information about the linux-arm-kernel
mailing list