linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] rtc: brcmstb-waketimer: add missed clk_disable_unprepare
@ 2019-11-04 15:50 Chuhong Yuan
  2019-11-04 17:36 ` Florian Fainelli
  0 siblings, 1 reply; 2+ messages in thread
From: Chuhong Yuan @ 2019-11-04 15:50 UTC (permalink / raw)
  Cc: linux-rtc, Alessandro Zummo, Alexandre Belloni, Florian Fainelli,
	Chuhong Yuan, linux-kernel, bcm-kernel-feedback-list,
	linux-arm-kernel

This driver forgets to disable and unprepare clock when remove.
Add a call to clk_disable_unprepare to fix it.

Signed-off-by: Chuhong Yuan <hslester96@gmail.com>
---
 drivers/rtc/rtc-brcmstb-waketimer.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/rtc/rtc-brcmstb-waketimer.c b/drivers/rtc/rtc-brcmstb-waketimer.c
index 3e9800f9878a..06b2bdde584a 100644
--- a/drivers/rtc/rtc-brcmstb-waketimer.c
+++ b/drivers/rtc/rtc-brcmstb-waketimer.c
@@ -277,6 +277,8 @@ static int brcmstb_waketmr_remove(struct platform_device *pdev)
 	struct brcmstb_waketmr *timer = dev_get_drvdata(&pdev->dev);
 
 	unregister_reboot_notifier(&timer->reboot_notifier);
+	if (timer->clk)
+		clk_disable_unprepare(timer->clk);
 
 	return 0;
 }
-- 
2.23.0


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-11-04 17:36 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-11-04 15:50 [PATCH] rtc: brcmstb-waketimer: add missed clk_disable_unprepare Chuhong Yuan
2019-11-04 17:36 ` Florian Fainelli

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).