]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
drm/bridge: thc63lvd1024: convert to of_drm_find_and_get_bridge()
authorLuca Ceresoli <luca.ceresoli@bootlin.com>
Fri, 9 Jan 2026 07:31:35 +0000 (08:31 +0100)
committerLuca Ceresoli <luca.ceresoli@bootlin.com>
Tue, 20 Jan 2026 13:53:45 +0000 (14:53 +0100)
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>
drivers/gpu/drm/bridge/thc63lvd1024.c

index 2cb7cd0c060824256bbfa511f833cc00437d318b..c804222846c38c3f0244498c440694f08da5c189 100644 (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,