Patchwork [V2,2/5] ata: pata_arasan: Add clk_{un}prepare() support

login
register
mail settings
Submitter viresh kumar
Date April 21, 2012, 12:10 p.m.
Message ID <6b5d5180809bff6d85d4a75ce59b44a5894784e3.1335009631.git.viresh.kumar@st.com>
Download mbox | patch
Permalink /patch/154209/
State Not Applicable
Delegated to: David Miller
Headers show

Comments

viresh kumar - April 21, 2012, 12:10 p.m.
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@st.com>
---
 drivers/ata/pata_arasan_cf.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

Patch

diff --git a/drivers/ata/pata_arasan_cf.c b/drivers/ata/pata_arasan_cf.c
index 5ebf1cc..aa3b4d4 100644
--- a/drivers/ata/pata_arasan_cf.c
+++ b/drivers/ata/pata_arasan_cf.c
@@ -311,7 +311,7 @@  static int cf_init(struct arasan_cf_dev *acdev)
 	int ret = 0;
 
 	if (!IS_ERR(acdev->clk)) {
-		ret = clk_enable(acdev->clk);
+		ret = clk_prepare_enable(acdev->clk);
 		if (ret) {
 			dev_dbg(acdev->host->dev, "clock enable failed");
 			return ret;
@@ -344,7 +344,7 @@  static void cf_exit(struct arasan_cf_dev *acdev)
 	spin_unlock_irqrestore(&acdev->host->lock, flags);
 
 	if (!IS_ERR(acdev->clk))
-		clk_disable(acdev->clk);
+		clk_disable_unprepare(acdev->clk);
 }
 
 static void dma_callback(void *dev)