Patchwork [V3,Resend,1/3] ata: pata_arasan: Add clk_{un}prepare() support

login
register
mail settings
Submitter viresh kumar
Date Aug. 27, 2012, 5:07 a.m.
Message ID <5c456890071e05817fa762e3e52ed5aa90f06bcd.1346042344.git.viresh.kumar@linaro.com>
Download mbox | patch
Permalink /patch/180121/
State Not Applicable
Delegated to: David Miller
Headers show

Comments

viresh kumar - Aug. 27, 2012, 5:07 a.m.
From: Viresh Kumar <viresh.kumar@linaro.com>

clk_{un}prepare is mandatory for platforms using common clock framework. Since
this driver is used by SPEAr platform, which supports common clock framework,
add clk_{un}prepare() support for it.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.com>
---
 drivers/ata/pata_arasan_cf.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Patch

diff --git a/drivers/ata/pata_arasan_cf.c b/drivers/ata/pata_arasan_cf.c
index bfaa5cb..d82c6dc 100644
--- a/drivers/ata/pata_arasan_cf.c
+++ b/drivers/ata/pata_arasan_cf.c
@@ -310,7 +310,7 @@  static int cf_init(struct arasan_cf_dev *acdev)
 	unsigned long flags;
 	int ret = 0;
 
-	ret = clk_enable(acdev->clk);
+	ret = clk_prepare_enable(acdev->clk);
 	if (ret) {
 		dev_dbg(acdev->host->dev, "clock enable failed");
 		return ret;
@@ -340,7 +340,7 @@  static void cf_exit(struct arasan_cf_dev *acdev)
 	writel(readl(acdev->vbase + OP_MODE) & ~CFHOST_ENB,
 			acdev->vbase + OP_MODE);
 	spin_unlock_irqrestore(&acdev->host->lock, flags);
-	clk_disable(acdev->clk);
+	clk_disable_unprepare(acdev->clk);
 }
 
 static void dma_callback(void *dev)