summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuca Ceresoli <luca.ceresoli@bootlin.com>2026-01-09 13:02:52 +0300
committerLuca Ceresoli <luca.ceresoli@bootlin.com>2026-01-21 15:59:56 +0300
commit6dfebeee296cbb3296f06c28f3b2d053ec8374e7 (patch)
tree8416328d95bc540970c1a011c9b0242b9468c8ee
parent9afbf7a9cce584e3ce7b709ea5654f2721b00694 (diff)
downloadlinux-6dfebeee296cbb3296f06c28f3b2d053ec8374e7.tar.xz
drm/imx/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. Acked-by: Maxime Ripard <mripard@kernel.org> Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de> Link: https://patch.msgid.link/20260109-drm-bridge-alloc-getput-drm_of_find_bridge-3-v2-3-8d7a3dbacdf4@bootlin.com Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
-rw-r--r--drivers/gpu/drm/imx/ipuv3/dw_hdmi-imx.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/gpu/drm/imx/ipuv3/dw_hdmi-imx.c b/drivers/gpu/drm/imx/ipuv3/dw_hdmi-imx.c
index 07e5f96202d4..398f3cce5532 100644
--- a/drivers/gpu/drm/imx/ipuv3/dw_hdmi-imx.c
+++ b/drivers/gpu/drm/imx/ipuv3/dw_hdmi-imx.c
@@ -241,7 +241,7 @@ static int dw_hdmi_imx_probe(struct platform_device *pdev)
if (IS_ERR(hdmi->hdmi))
return PTR_ERR(hdmi->hdmi);
- hdmi->bridge = of_drm_find_bridge(np);
+ hdmi->bridge = of_drm_find_and_get_bridge(np);
if (!hdmi->bridge) {
dev_err(hdmi->dev, "Unable to find bridge\n");
dw_hdmi_remove(hdmi->hdmi);
@@ -249,8 +249,10 @@ static int dw_hdmi_imx_probe(struct platform_device *pdev)
}
ret = component_add(&pdev->dev, &dw_hdmi_imx_ops);
- if (ret)
+ if (ret) {
+ drm_bridge_put(hdmi->bridge);
dw_hdmi_remove(hdmi->hdmi);
+ }
return ret;
}
@@ -260,6 +262,7 @@ static void dw_hdmi_imx_remove(struct platform_device *pdev)
struct imx_hdmi *hdmi = platform_get_drvdata(pdev);
component_del(&pdev->dev, &dw_hdmi_imx_ops);
+ drm_bridge_put(hdmi->bridge);
dw_hdmi_remove(hdmi->hdmi);
}