[PATCH 17/26] drm/meson: encoder_*: use devm_drm_of_find_bridge() to put the next bridge

Luca Ceresoli
2025-11-19T13:08:35Z

This driver obtains a bridge pointer from of_drm_find_bridge() in the probe
function and stores it until driver removal. of_drm_find_bridge() is
deprecated. Move to devm_drm_of_find_bridge() which puts the bridge
reference on remove or on probe failure.

Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
---
drivers/gpu/drm/meson/meson_encoder_cvbs.c | 2 +-
drivers/gpu/drm/meson/meson_encoder_dsi.c | 2 +-
drivers/gpu/drm/meson/meson_encoder_hdmi.c | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/meson/meson_encoder_cvbs.c b/drivers/gpu/drm/meson/meson_encoder_cvbs.c
index dc374bfc5951..577f6b1e162f 100644
--- a/drivers/gpu/drm/meson/meson_encoder_cvbs.c
+++ b/drivers/gpu/drm/meson/meson_encoder_cvbs.c
@@ -241,7 +241,7 @@ int meson_encoder_cvbs_probe(struct meson_drm *priv)
return 0;
}

- meson_encoder_cvbs->next_bridge = of_drm_find_bridge(remote);
+ meson_encoder_cvbs->next_bridge = devm_drm_of_find_bridge(priv->dev, remote);
of_node_put(remote);
if (!meson_encoder_cvbs->next_bridge)
return dev_err_probe(priv->dev, -EPROBE_DEFER,
diff --git a/drivers/gpu/drm/meson/meson_encoder_dsi.c b/drivers/gpu/drm/meson/meson_encoder_dsi.c
index 6c6624f9ba24..dd5d6e6a7cb0 100644
--- a/drivers/gpu/drm/meson/meson_encoder_dsi.c
+++ b/drivers/gpu/drm/meson/meson_encoder_dsi.c
@@ -120,7 +120,7 @@ int meson_encoder_dsi_probe(struct meson_drm *priv)
return 0;
}

- meson_encoder_dsi->next_bridge = of_drm_find_bridge(remote);
+ meson_encoder_dsi->next_bridge = devm_drm_of_find_bridge(priv->dev, remote);
if (!meson_encoder_dsi->next_bridge)
return dev_err_probe(priv->dev, -EPROBE_DEFER,
"Failed to find DSI transceiver bridge\n");
diff --git a/drivers/gpu/drm/meson/meson_encoder_hdmi.c b/drivers/gpu/drm/meson/meson_encoder_hdmi.c
index 8205ee56a691..e2d861239eda 100644
--- a/drivers/gpu/drm/meson/meson_encoder_hdmi.c
+++ b/drivers/gpu/drm/meson/meson_encoder_hdmi.c
@@ -390,7 +390,7 @@ int meson_encoder_hdmi_probe(struct meson_drm *priv)
return 0;
}

- meson_encoder_hdmi->next_bridge = of_drm_find_bridge(remote);
+ meson_encoder_hdmi->next_bridge = devm_drm_of_find_bridge(priv->dev, remote);
if (!meson_encoder_hdmi->next_bridge) {
ret = dev_err_probe(priv->dev, -EPROBE_DEFER,
"Failed to find HDMI transceiver bridge\n");

--
2.51.1