mirror of
https://github.com/torvalds/linux.git
synced 2026-05-28 09:04:39 +02:00
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>
This commit is contained in:
parent
3b3ddafde1
commit
4e7fd5aa3f
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user