pata_arasan: Add clk_{un}prepare() support
authorViresh Kumar <viresh.kumar@linaro.com>
Mon, 27 Aug 2012 05:07:17 +0000 (10:37 +0530)
committerJeff Garzik <jgarzik@redhat.com>
Thu, 13 Sep 2012 05:09:51 +0000 (01:09 -0400)
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>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
drivers/ata/pata_arasan_cf.c

index bfaa5cb1629ae8651f111c46d0e78b694072aac1..d82c6dc0c20c1717ad1b55d3e68183e2efb9cab1 100644 (file)
@@ -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)