]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
drm/bridge: tpd12s015: convert to of_drm_find_and_get_bridge()
authorLuca Ceresoli <luca.ceresoli@bootlin.com>
Fri, 9 Jan 2026 07:31:37 +0000 (08:31 +0100)
committerLuca Ceresoli <luca.ceresoli@bootlin.com>
Tue, 20 Jan 2026 13:53:46 +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-6-8bad3ef90b9f@bootlin.com
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
drivers/gpu/drm/bridge/ti-tpd12s015.c

index dcf686c4e73d4084ae005e686a7429e565f55aa2..136e47ad1a10d47a3e2a7746c8f486f35e82a596 100644 (file)
@@ -28,8 +28,6 @@ struct tpd12s015_device {
        struct gpio_desc *ls_oe_gpio;
        struct gpio_desc *hpd_gpio;
        int hpd_irq;
-
-       struct drm_bridge *next_bridge;
 };
 
 static inline struct tpd12s015_device *to_tpd12s015(struct drm_bridge *bridge)
@@ -47,7 +45,7 @@ static int tpd12s015_attach(struct drm_bridge *bridge,
        if (!(flags & DRM_BRIDGE_ATTACH_NO_CONNECTOR))
                return -EINVAL;
 
-       ret = drm_bridge_attach(encoder, tpd->next_bridge,
+       ret = drm_bridge_attach(encoder, tpd->bridge.next_bridge,
                                bridge, flags);
        if (ret < 0)
                return ret;
@@ -138,10 +136,10 @@ static int tpd12s015_probe(struct platform_device *pdev)
        if (!node)
                return -ENODEV;
 
-       tpd->next_bridge = of_drm_find_bridge(node);
+       tpd->bridge.next_bridge = of_drm_find_and_get_bridge(node);
        of_node_put(node);
 
-       if (!tpd->next_bridge)
+       if (!tpd->bridge.next_bridge)
                return -EPROBE_DEFER;
 
        /* Get the control and HPD GPIOs. */