From patchwork Thu Nov 8 14:37:40 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [2/3] rtc: rtc-spear: Add clk_{un}prepare() support From: viresh kumar X-Patchwork-Id: 197842 Message-Id: To: akpm@linux-foundation.org Cc: rtc-linux@googlegroups.com, linux-kernel@vger.kernel.org, a.zummo@towertech.it, spear-devel@list.st.com, Deepak Sikri , Viresh Kumar Date: Thu, 8 Nov 2012 20:07:40 +0530 From: Deepak Sikri 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 ones in probe/remove. Signed-off-by: Deepak Sikri Signed-off-by: Viresh Kumar --- drivers/rtc/rtc-spear.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/rtc/rtc-spear.c b/drivers/rtc/rtc-spear.c index 480ecc3..990de02 100644 --- a/drivers/rtc/rtc-spear.c +++ b/drivers/rtc/rtc-spear.c @@ -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;