From: Wolfram Sang Date: Wed, 12 Mar 2025 10:00:00 +0000 (+0100) Subject: rtc: rzn1: clear interrupts on remove X-Git-Tag: v6.16-rc1~41^2~30 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0bddd060a6a3a10e6ebd386cc4d9a897e8a60861;p=thirdparty%2Flinux.git rtc: rzn1: clear interrupts on remove It is good practice to clear running interrupts before removing the driver. This is not really a bugfix because on current systems RuntimePM will disable the module clock, so interrupts won't be initiated. The dependency on that behaviour is subtle, though. Better be self-contained and clean up when removing. Signed-off-by: Wolfram Sang Link: https://lore.kernel.org/r/20250312100105.36767-2-wsa+renesas@sang-engineering.com Signed-off-by: Alexandre Belloni --- diff --git a/drivers/rtc/rtc-rzn1.c b/drivers/rtc/rtc-rzn1.c index eeb9612a666fd..3c2861983ff1e 100644 --- a/drivers/rtc/rtc-rzn1.c +++ b/drivers/rtc/rtc-rzn1.c @@ -444,6 +444,11 @@ dis_runtime_pm: static void rzn1_rtc_remove(struct platform_device *pdev) { + struct rzn1_rtc *rtc = platform_get_drvdata(pdev); + + /* Disable all interrupts */ + writel(0, rtc->base + RZN1_RTC_CTL1); + pm_runtime_put(&pdev->dev); }