[PATCH 05/12] rtc: imxdi: clear the wake IRQ on removal
Prasanth R
ragaprasanth at gmail.com
Tue Nov 24 23:20:19 PST 2026
From: Prasanth R <ragaprasanth at gmail.com>
dryice_rtc_remove() and the probe error path do not release the wake IRQ
set with dev_pm_set_wake_irq() or the wakeup source enabled with
device_init_wakeup().
When the module is loaded again, dev_pm_set_wake_irq() finds the old
wake IRQ and warns "wake irq already initialized".
Use the device-managed variants so both are released when the driver is
removed.
Compile-tested only.
I used an AI assistant (Claude) to find this and write the change.
Fixes: bcae59d0d45b ("rtc: imxdi: add wakeup support")
Signed-off-by: Prasanth R <prasanth.r at lineo.co.jp>
---
drivers/rtc/rtc-imxdi.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/rtc/rtc-imxdi.c b/drivers/rtc/rtc-imxdi.c
index 4066e32b5..a1afe84d6 100644
--- a/drivers/rtc/rtc-imxdi.c
+++ b/drivers/rtc/rtc-imxdi.c
@@ -812,8 +812,8 @@ static int __init dryice_rtc_probe(struct platform_device *pdev)
platform_set_drvdata(pdev, imxdi);
- device_init_wakeup(&pdev->dev, true);
- dev_pm_set_wake_irq(&pdev->dev, norm_irq);
+ devm_device_init_wakeup(&pdev->dev);
+ devm_pm_set_wake_irq(&pdev->dev, norm_irq);
imxdi->rtc->ops = &dryice_rtc_ops;
imxdi->rtc->range_max = U32_MAX;
--
2.43.0
More information about the linux-arm-kernel
mailing list