public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/4] rtc: s3c: add missing clk control
@ 2015-08-11 11:28 Joonyoung Shim
  2015-08-11 11:28 ` [PATCH 2/4] rtc: s3c: remove unnecessary NULL assignment Joonyoung Shim
                   ` (4 more replies)
  0 siblings, 5 replies; 12+ messages in thread
From: Joonyoung Shim @ 2015-08-11 11:28 UTC (permalink / raw)
  To: rtc-linux
  Cc: linux-kernel, linux-samsung-soc, a.zummo, alexandre.belloni,
	cw00.choi, k.kozlowski, jy0922.shim

It's missed to call clk_unprepare() about info->rtc_src_clk in
s3c_rtc_remove and to call clk_disable_unprepare about info->rtc_clk in
error routine of s3c_rtc_probe.

Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
---
 drivers/rtc/rtc-s3c.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/rtc/rtc-s3c.c b/drivers/rtc/rtc-s3c.c
index a0f8323..d1866a4 100644
--- a/drivers/rtc/rtc-s3c.c
+++ b/drivers/rtc/rtc-s3c.c
@@ -410,6 +410,8 @@ static int s3c_rtc_remove(struct platform_device *pdev)
 
 	s3c_rtc_setaie(info->dev, 0);
 
+	if (info->data->needs_src_clk)
+		clk_unprepare(info->rtc_src_clk);
 	clk_unprepare(info->rtc_clk);
 	info->rtc_clk = NULL;
 
@@ -482,6 +484,7 @@ static int s3c_rtc_probe(struct platform_device *pdev)
 		if (IS_ERR(info->rtc_src_clk)) {
 			dev_err(&pdev->dev,
 				"failed to find rtc source clock\n");
+			clk_disable_unprepare(info->rtc_clk);
 			return PTR_ERR(info->rtc_src_clk);
 		}
 		clk_prepare_enable(info->rtc_src_clk);
-- 
1.9.1


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

end of thread, other threads:[~2015-08-20 23:07 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-11 11:28 [PATCH 1/4] rtc: s3c: add missing clk control Joonyoung Shim
2015-08-11 11:28 ` [PATCH 2/4] rtc: s3c: remove unnecessary NULL assignment Joonyoung Shim
2015-08-12  0:07   ` Krzysztof Kozlowski
2015-08-20 23:07   ` Alexandre Belloni
2015-08-11 11:28 ` [PATCH 3/4] rtc: s3c: use unified functions for enable/disable of clk Joonyoung Shim
2015-08-12  0:10   ` Krzysztof Kozlowski
2015-08-12 10:26     ` Joonyoung Shim
2015-08-11 11:28 ` [PATCH 4/4] rtc: s3c: enable/disable clocks for alarm Joonyoung Shim
2015-08-12  0:28   ` Krzysztof Kozlowski
2015-08-12  1:09     ` Joonyoung Shim
2015-08-12  0:06 ` [PATCH 1/4] rtc: s3c: add missing clk control Krzysztof Kozlowski
2015-08-20 23:06 ` Alexandre Belloni

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox