From 4e7fd5aa3f3939dfcd8b0578de57f1cc00d6c31c Mon Sep 17 00:00:00 2001 From: Luca Ceresoli Date: Fri, 9 Jan 2026 11:02:50 +0100 Subject: [PATCH] drm/bridge: dw-hdmi: convert to of_drm_find_and_get_bridge() of_drm_find_bridge() is deprecated. Move to its replacement of_drm_find_and_get_bridge() which gets a bridge reference, and ensure it is put when done by using the drm_bridge::next_bridge pointer. Acked-by: Maxime Ripard Link: https://patch.msgid.link/20260109-drm-bridge-alloc-getput-drm_of_find_bridge-3-v2-1-8d7a3dbacdf4@bootlin.com Signed-off-by: Luca Ceresoli --- drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c index 3b77e73ac0eaa..ee88c0e793b04 100644 --- a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c +++ b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c @@ -132,7 +132,6 @@ struct dw_hdmi_phy_data { struct dw_hdmi { struct drm_connector connector; struct drm_bridge bridge; - struct drm_bridge *next_bridge; unsigned int version; @@ -2912,7 +2911,7 @@ static int dw_hdmi_bridge_attach(struct drm_bridge *bridge, struct dw_hdmi *hdmi = bridge->driver_private; if (flags & DRM_BRIDGE_ATTACH_NO_CONNECTOR) - return drm_bridge_attach(encoder, hdmi->next_bridge, + return drm_bridge_attach(encoder, hdmi->bridge.next_bridge, bridge, flags); return dw_hdmi_connector_create(hdmi); @@ -3318,9 +3317,9 @@ static int dw_hdmi_parse_dt(struct dw_hdmi *hdmi) if (!remote) return -ENODEV; - hdmi->next_bridge = of_drm_find_bridge(remote); + hdmi->bridge.next_bridge = of_drm_find_and_get_bridge(remote); of_node_put(remote); - if (!hdmi->next_bridge) + if (!hdmi->bridge.next_bridge) return -EPROBE_DEFER; return 0; -- 2.47.3