Skip to content

Commit 4e7fd5a

Browse files
committed
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 <mripard@kernel.org> 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 <luca.ceresoli@bootlin.com>
1 parent 3b3ddaf commit 4e7fd5a

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

drivers/gpu/drm/bridge/synopsys/dw-hdmi.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,6 @@ struct dw_hdmi_phy_data {
132132
struct dw_hdmi {
133133
struct drm_connector connector;
134134
struct drm_bridge bridge;
135-
struct drm_bridge *next_bridge;
136135

137136
unsigned int version;
138137

@@ -2912,7 +2911,7 @@ static int dw_hdmi_bridge_attach(struct drm_bridge *bridge,
29122911
struct dw_hdmi *hdmi = bridge->driver_private;
29132912

29142913
if (flags & DRM_BRIDGE_ATTACH_NO_CONNECTOR)
2915-
return drm_bridge_attach(encoder, hdmi->next_bridge,
2914+
return drm_bridge_attach(encoder, hdmi->bridge.next_bridge,
29162915
bridge, flags);
29172916

29182917
return dw_hdmi_connector_create(hdmi);
@@ -3318,9 +3317,9 @@ static int dw_hdmi_parse_dt(struct dw_hdmi *hdmi)
33183317
if (!remote)
33193318
return -ENODEV;
33203319

3321-
hdmi->next_bridge = of_drm_find_bridge(remote);
3320+
hdmi->bridge.next_bridge = of_drm_find_and_get_bridge(remote);
33223321
of_node_put(remote);
3323-
if (!hdmi->next_bridge)
3322+
if (!hdmi->bridge.next_bridge)
33243323
return -EPROBE_DEFER;
33253324

33263325
return 0;

0 commit comments

Comments
 (0)