Commit 9d34e1a8 authored by Luca Ceresoli's avatar Luca Ceresoli
Browse files

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: default avatarMaxime 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: default avatarLuca Ceresoli <luca.ceresoli@bootlin.com>
parent d07490fb
Loading
Loading
Loading
Loading
+3 −4
Original line number Diff line number Diff line
@@ -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,