aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/rtc/rtc-s3c.c
diff options
context:
space:
mode:
authorJoonyoung Shim <[email protected]>2015-08-11 11:28:19 +0000
committerAlexandre Belloni <[email protected]>2015-09-05 11:19:13 +0000
commit7f23a93661eb5caa373f75a145cec14331a8caaa (patch)
treef2acdd2523cc889cc7e0c778addeccc8fab787c8 /drivers/rtc/rtc-s3c.c
parentrtc: s3c: fix disabled clocks for alarm (diff)
downloadkernel-7f23a93661eb5caa373f75a145cec14331a8caaa.tar.gz
kernel-7f23a93661eb5caa373f75a145cec14331a8caaa.zip
rtc: s3c: add missing clk control
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 <[email protected]> Reviewed-by: Krzysztof Kozlowski <[email protected]> Signed-off-by: Alexandre Belloni <[email protected]>
Diffstat (limited to 'drivers/rtc/rtc-s3c.c')
-rw-r--r--drivers/rtc/rtc-s3c.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/rtc/rtc-s3c.c b/drivers/rtc/rtc-s3c.c
index 2e709e239dbc..3ee961529b5b 100644
--- a/drivers/rtc/rtc-s3c.c
+++ b/drivers/rtc/rtc-s3c.c
@@ -422,6 +422,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;
@@ -494,6 +496,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);