[PATCH 09/26] drm/bridge: simple-bridge: use devm_drm_of_find_bridge() to put the next bridge

Luca Ceresoli
2025-11-19T13:07:25Z

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/bridge/simple-bridge.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/bridge/simple-bridge.c b/drivers/gpu/drm/bridge/simple-bridge.c
index 90abda199cea..a4f74c940dd1 100644
--- a/drivers/gpu/drm/bridge/simple-bridge.c
+++ b/drivers/gpu/drm/bridge/simple-bridge.c
@@ -180,7 +180,7 @@ static int simple_bridge_probe(struct platform_device *pdev)
if (!remote)
return -EINVAL;

- sbridge->next_bridge = of_drm_find_bridge(remote);
+ sbridge->next_bridge = devm_drm_of_find_bridge(&pdev->dev, remote);
of_node_put(remote);

if (!sbridge->next_bridge) {

--
2.51.1