[PATCH v2 17/26] drm/meson: encoder_*: use devm_of_drm_get_bridge() to put the next bridge
Luca Ceresoli
luca.ceresoli at bootlin.com
Fri Nov 28 08:50:27 PST 2025
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_of_drm_get_bridge() which puts the bridge
reference on remove or on probe failure.
Signed-off-by: Luca Ceresoli <luca.ceresoli at 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..bf8588a5f6dd 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_of_drm_get_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..6304f51a7e7e 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_of_drm_get_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..e2a871347136 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_of_drm_get_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
More information about the linux-amlogic
mailing list