[PATCH 3/3] ASoC: atmel: mchp-spdiftx: Move IRQ request after runtime PM setup

phucduc.bui at gmail.com phucduc.bui at gmail.com
Fri Nov 20 01:43:54 PST 2026


From: bui duc phuc <phucduc.bui at gmail.com>

Move devm_request_irq() after runtime PM setup to ensure the IRQ is
released before the runtime suspend action runs during cleanup.

Signed-off-by: bui duc phuc <phucduc.bui at gmail.com>
---
 sound/soc/atmel/mchp-spdiftx.c | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/sound/soc/atmel/mchp-spdiftx.c b/sound/soc/atmel/mchp-spdiftx.c
index b034bd46cd5a..658ff667439c 100644
--- a/sound/soc/atmel/mchp-spdiftx.c
+++ b/sound/soc/atmel/mchp-spdiftx.c
@@ -812,16 +812,11 @@ static int mchp_spdiftx_probe(struct platform_device *pdev)
 	if (IS_ERR(regmap))
 		return PTR_ERR(regmap);
 
-	/* Request IRQ */
+	/* Get IRQ */
 	irq = platform_get_irq(pdev, 0);
 	if (irq < 0)
 		return irq;
 
-	err = devm_request_irq(&pdev->dev, irq, mchp_spdiftx_interrupt, 0,
-			       dev_name(&pdev->dev), dev);
-	if (err)
-		return err;
-
 	/* Get the peripheral clock */
 	dev->pclk = devm_clk_get(&pdev->dev, "pclk");
 	if (IS_ERR(dev->pclk))
@@ -863,6 +858,12 @@ static int mchp_spdiftx_probe(struct platform_device *pdev)
 		}
 	}
 
+	/* Request IRQ */
+	err = devm_request_irq(&pdev->dev, irq, mchp_spdiftx_interrupt, 0,
+			       dev_name(&pdev->dev), dev);
+	if (err)
+		return err;
+
 	dev->playback.addr = (dma_addr_t)mem->start + SPDIFTX_CDR;
 	dev->playback.addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES;
 
-- 
2.43.0




More information about the linux-arm-kernel mailing list