|
@@ -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);
|