Commit 93d78394 authored by Deepak Sikri's avatar Deepak Sikri Committed by Linus Torvalds

rtc: rtc-spear: Add clk_{un}prepare() support

clk_{un}prepare is mandatory for platforms using common clock framework.
Because for SPEAr we don't do anything in clk_{un}prepare() calls, just
call them once in probe/remove.
Signed-off-by: default avatarDeepak Sikri <deepak.sikri@st.com>
Signed-off-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent bdaa2c63
...@@ -395,7 +395,7 @@ static int __devinit spear_rtc_probe(struct platform_device *pdev) ...@@ -395,7 +395,7 @@ static int __devinit spear_rtc_probe(struct platform_device *pdev)
if (IS_ERR(config->clk)) if (IS_ERR(config->clk))
return PTR_ERR(config->clk); return PTR_ERR(config->clk);
status = clk_enable(config->clk); status = clk_prepare_enable(config->clk);
if (status < 0) if (status < 0)
return status; return status;
...@@ -418,7 +418,7 @@ static int __devinit spear_rtc_probe(struct platform_device *pdev) ...@@ -418,7 +418,7 @@ static int __devinit spear_rtc_probe(struct platform_device *pdev)
err_disable_clock: err_disable_clock:
platform_set_drvdata(pdev, NULL); platform_set_drvdata(pdev, NULL);
clk_disable(config->clk); clk_disable_unprepare(config->clk);
return status; return status;
} }
...@@ -429,7 +429,7 @@ static int __devexit spear_rtc_remove(struct platform_device *pdev) ...@@ -429,7 +429,7 @@ static int __devexit spear_rtc_remove(struct platform_device *pdev)
rtc_device_unregister(config->rtc); rtc_device_unregister(config->rtc);
spear_rtc_disable_interrupt(config); spear_rtc_disable_interrupt(config);
clk_disable(config->clk); clk_disable_unprepare(config->clk);
device_init_wakeup(&pdev->dev, 0); device_init_wakeup(&pdev->dev, 0);
return 0; return 0;
......
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