[PATCH v2 23/26] drm/bridge: dw-hdmi: use devm_of_drm_get_bridge() to put the next bridge

Luca Ceresoli posted 26 patches 3 days, 5 hours ago
[PATCH v2 23/26] drm/bridge: dw-hdmi: use devm_of_drm_get_bridge() to put the next bridge
Posted by Luca Ceresoli 3 days, 5 hours ago
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@bootlin.com>
---
 drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
index 3b77e73ac0ea..f5abb2b7c926 100644
--- a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
+++ b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
@@ -3318,7 +3318,7 @@ static int dw_hdmi_parse_dt(struct dw_hdmi *hdmi)
 	if (!remote)
 		return -ENODEV;
 
-	hdmi->next_bridge = of_drm_find_bridge(remote);
+	hdmi->next_bridge = devm_of_drm_get_bridge(hdmi->dev, remote);
 	of_node_put(remote);
 	if (!hdmi->next_bridge)
 		return -EPROBE_DEFER;

-- 
2.51.1