drm/bridge: thc63lvd1024: 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-2-v2-4-8bad3ef90b9f@bootlin.com
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
This commit is contained in:
Luca Ceresoli 2026-01-09 08:31:35 +01:00
parent d07490fb23
commit 9d34e1a8cf

View File

@ -32,7 +32,6 @@ struct thc63_dev {
struct gpio_desc *oe;
struct drm_bridge bridge;
struct drm_bridge *next;
struct drm_bridge_timings timings;
};
@ -48,7 +47,7 @@ static int thc63_attach(struct drm_bridge *bridge,
{
struct thc63_dev *thc63 = to_thc63(bridge);
return drm_bridge_attach(encoder, thc63->next, bridge, flags);
return drm_bridge_attach(encoder, thc63->bridge.next_bridge, bridge, flags);
}
static enum drm_mode_status thc63_mode_valid(struct drm_bridge *bridge,
@ -132,9 +131,9 @@ static int thc63_parse_dt(struct thc63_dev *thc63)
return -ENODEV;
}
thc63->next = of_drm_find_bridge(remote);
thc63->bridge.next_bridge = of_drm_find_and_get_bridge(remote);
of_node_put(remote);
if (!thc63->next)
if (!thc63->bridge.next_bridge)
return -EPROBE_DEFER;
endpoint = of_graph_get_endpoint_by_regs(thc63->dev->of_node,