Commit 7f23a936 authored by Joonyoung Shim's avatar Joonyoung Shim Committed by Alexandre Belloni

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: default avatarJoonyoung Shim <jy0922.shim@samsung.com>
Reviewed-by: default avatarKrzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: default avatarAlexandre Belloni <alexandre.belloni@free-electrons.com>
parent 1fb1c35f
...@@ -422,6 +422,8 @@ static int s3c_rtc_remove(struct platform_device *pdev) ...@@ -422,6 +422,8 @@ static int s3c_rtc_remove(struct platform_device *pdev)
s3c_rtc_setaie(info->dev, 0); s3c_rtc_setaie(info->dev, 0);
if (info->data->needs_src_clk)
clk_unprepare(info->rtc_src_clk);
clk_unprepare(info->rtc_clk); clk_unprepare(info->rtc_clk);
info->rtc_clk = NULL; info->rtc_clk = NULL;
...@@ -494,6 +496,7 @@ static int s3c_rtc_probe(struct platform_device *pdev) ...@@ -494,6 +496,7 @@ static int s3c_rtc_probe(struct platform_device *pdev)
if (IS_ERR(info->rtc_src_clk)) { if (IS_ERR(info->rtc_src_clk)) {
dev_err(&pdev->dev, dev_err(&pdev->dev,
"failed to find rtc source clock\n"); "failed to find rtc source clock\n");
clk_disable_unprepare(info->rtc_clk);
return PTR_ERR(info->rtc_src_clk); return PTR_ERR(info->rtc_src_clk);
} }
clk_prepare_enable(info->rtc_src_clk); clk_prepare_enable(info->rtc_src_clk);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment