]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
rtc: rtc-spear: Add clk_{un}prepare() support
authorDeepak Sikri <deepak.sikri@st.com>
Fri, 9 Nov 2012 03:04:59 +0000 (14:04 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 14 Nov 2012 04:55:19 +0000 (15:55 +1100)
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: Deepak Sikri <deepak.sikri@st.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
drivers/rtc/rtc-spear.c

index 480ecc3b73fdbceccc7439ee709a5cde3234267a..990de02281f16eb2e15673e5264263fd5e0067fa 100644 (file)
@@ -401,7 +401,7 @@ static int __devinit spear_rtc_probe(struct platform_device *pdev)
        if (IS_ERR(config->clk))
                return PTR_ERR(config->clk);
 
-       status = clk_enable(config->clk);
+       status = clk_prepare_enable(config->clk);
        if (status < 0)
                return status;
 
@@ -424,7 +424,7 @@ static int __devinit spear_rtc_probe(struct platform_device *pdev)
 
 err_disable_clock:
        platform_set_drvdata(pdev, NULL);
-       clk_disable(config->clk);
+       clk_disable_unprepare(config->clk);
 
        return status;
 }
@@ -435,7 +435,7 @@ static int __devexit spear_rtc_remove(struct platform_device *pdev)
 
        rtc_device_unregister(config->rtc);
        spear_rtc_disable_interrupt(config);
-       clk_disable(config->clk);
+       clk_disable_unprepare(config->clk);
        device_init_wakeup(&pdev->dev, 0);
 
        return 0;