From: Luca Ceresoli Date: Tue, 28 Oct 2025 10:15:42 +0000 (+0100) Subject: drm/sti: hda: add bridge before attaching X-Git-Tag: v6.19-rc1~157^2~16^2~35 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d28726efc637c5e76e23156b0c2418d37ef45b8e;p=thirdparty%2Fkernel%2Flinux.git drm/sti: hda: add bridge before attaching DRM bridges should be always added to the global bridge list before being attached. Acked-by: Raphael Gallais-Pou Acked-by: Alain Volmat Link: https://patch.msgid.link/20251028-b4-drm-bridge-alloc-add-before-attach-v3-1-bb8611acbbfb@bootlin.com Signed-off-by: Luca Ceresoli --- diff --git a/drivers/gpu/drm/sti/sti_hda.c b/drivers/gpu/drm/sti/sti_hda.c index 2c015f563de96..b7397827889c9 100644 --- a/drivers/gpu/drm/sti/sti_hda.c +++ b/drivers/gpu/drm/sti/sti_hda.c @@ -779,6 +779,8 @@ static int sti_hda_probe(struct platform_device *pdev) return PTR_ERR(hda->clk_hddac); } + drm_bridge_add(&hda->bridge); + platform_set_drvdata(pdev, hda); return component_add(&pdev->dev, &sti_hda_ops); @@ -786,7 +788,10 @@ static int sti_hda_probe(struct platform_device *pdev) static void sti_hda_remove(struct platform_device *pdev) { + struct sti_hda *hda = platform_get_drvdata(pdev); + component_del(&pdev->dev, &sti_hda_ops); + drm_bridge_remove(&hda->bridge); } static const struct of_device_id hda_of_match[] = {