[PATCH 3/3] ASoC: atmel: mchp-i2s-mcc: Request IRQ after enabling pclk
phucduc.bui at gmail.com
phucduc.bui at gmail.com
Mon Nov 16 01:24:06 PST 2026
From: bui duc phuc <phucduc.bui at gmail.com>
Request the IRQ after enabling the peripheral clock to ensure
the clock is available when the interrupt handler accesses
hardware registers.
This also ensures proper resource cleanup ordering, with the
IRQ being released before the clock is disabled.
Signed-off-by: bui duc phuc <phucduc.bui at gmail.com>
---
sound/soc/atmel/mchp-i2s-mcc.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/sound/soc/atmel/mchp-i2s-mcc.c b/sound/soc/atmel/mchp-i2s-mcc.c
index fe42a8c2cad3..6a54d3d67e86 100644
--- a/sound/soc/atmel/mchp-i2s-mcc.c
+++ b/sound/soc/atmel/mchp-i2s-mcc.c
@@ -1059,11 +1059,6 @@ static int mchp_i2s_mcc_probe(struct platform_device *pdev)
if (irq < 0)
return irq;
- err = devm_request_irq(&pdev->dev, irq, mchp_i2s_mcc_interrupt, 0,
- dev_name(&pdev->dev), dev);
- if (err)
- return err;
-
dev->pclk = devm_clk_get_enabled(&pdev->dev, "pclk");
if (IS_ERR(dev->pclk))
return dev_err_probe(&pdev->dev, PTR_ERR(dev->pclk),
@@ -1084,6 +1079,11 @@ static int mchp_i2s_mcc_probe(struct platform_device *pdev)
dev->regmap = regmap;
platform_set_drvdata(pdev, dev);
+ err = devm_request_irq(&pdev->dev, irq, mchp_i2s_mcc_interrupt, 0,
+ dev_name(&pdev->dev), dev);
+ if (err)
+ return err;
+
err = devm_snd_soc_register_component(&pdev->dev,
&mchp_i2s_mcc_component,
&mchp_i2s_mcc_dai, 1);
--
2.43.0
More information about the linux-arm-kernel
mailing list