Skip to content

Commit

Permalink
drivers/rtc/rtc-s3c.c: use clk_prepare_enable and clk_disable_unprepare
Browse files Browse the repository at this point in the history
Convert clk_enable/clk_disable to clk_prepare_enable/clk_disable_unprepare
calls as required by common clock framework.

Signed-off-by: Thomas Abraham <thomas.abraham@linaro.org>
Signed-off-by: Vivek Gautam <gautam.vivek@samsung.com>
Reviewed-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Reviewed-by: Jingoo Han <jg1.han@samsung.com>
Acked-by: Kukjin Kim <kgene.kim@samsung.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Thomas Abraham authored and Linus Torvalds committed Apr 30, 2013
1 parent e005715 commit 1a3224f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions drivers/rtc/rtc-s3c.c
Original file line number Diff line number Diff line change
Expand Up @@ -426,6 +426,7 @@ static int s3c_rtc_remove(struct platform_device *dev)

s3c_rtc_setaie(&dev->dev, 0);

clk_unprepare(rtc_clk);
rtc_clk = NULL;

return 0;
Expand Down Expand Up @@ -494,7 +495,7 @@ static int s3c_rtc_probe(struct platform_device *pdev)
return ret;
}

clk_enable(rtc_clk);
clk_prepare_enable(rtc_clk);

/* check to see if everything is setup correctly */

Expand Down Expand Up @@ -573,7 +574,7 @@ static int s3c_rtc_probe(struct platform_device *pdev)

err_nortc:
s3c_rtc_enable(pdev, 0);
clk_disable(rtc_clk);
clk_disable_unprepare(rtc_clk);

return ret;
}
Expand Down

0 comments on commit 1a3224f

Please sign in to comment.