Skip to content

Commit 0bddd06

Browse files
Wolfram Sangalexandrebelloni
authored andcommitted
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 <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexandre Belloni <[email protected]>
1 parent 8003a55 commit 0bddd06

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

drivers/rtc/rtc-rzn1.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -444,6 +444,11 @@ static int rzn1_rtc_probe(struct platform_device *pdev)
444444

445445
static void rzn1_rtc_remove(struct platform_device *pdev)
446446
{
447+
struct rzn1_rtc *rtc = platform_get_drvdata(pdev);
448+
449+
/* Disable all interrupts */
450+
writel(0, rtc->base + RZN1_RTC_CTL1);
451+
447452
pm_runtime_put(&pdev->dev);
448453
}
449454

0 commit comments

Comments
 (0)