aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata/pata_arasan_cf.c
diff options
context:
space:
mode:
authorViresh Kumar <viresh.kumar@st.com>2012-07-30 17:39:35 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2012-07-30 20:25:12 -0400
commitd14fb1e93086ec1acec34d5e17c989fa528c65e5 (patch)
treee8179ba53d1b03b009667bd0f1916fd5418485b2 /drivers/ata/pata_arasan_cf.c
parent08aff5358207ee80e4fe162845c17ea125295eec (diff)
ata/pata_arasan: remove conditional compilation of clk code
With addition of dummy clk_*() calls for non CONFIG_HAVE_CLK cases in clk.h, there is no need to have clk code enclosed in #ifdef CONFIG_HAVE_CLK, #endif macros. Signed-off-by: Viresh Kumar <viresh.kumar@st.com> Cc: Jeff Garzik <jgarzik@redhat.com> Cc: Russell King <rmk@arm.linux.org.uk> Cc: Mike Turquette <mturquette@linaro.org> Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com> Cc: viresh kumar <viresh.linux@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/ata/pata_arasan_cf.c')
-rw-r--r--drivers/ata/pata_arasan_cf.c14
1 files changed, 1 insertions, 13 deletions
diff --git a/drivers/ata/pata_arasan_cf.c b/drivers/ata/pata_arasan_cf.c
index ac6a5beb28f3..bfaa5cb1629a 100644
--- a/drivers/ata/pata_arasan_cf.c
+++ b/drivers/ata/pata_arasan_cf.c
@@ -184,10 +184,8 @@
184struct arasan_cf_dev { 184struct arasan_cf_dev {
185 /* pointer to ata_host structure */ 185 /* pointer to ata_host structure */
186 struct ata_host *host; 186 struct ata_host *host;
187 /* clk structure, only if HAVE_CLK is defined */ 187 /* clk structure */
188#ifdef CONFIG_HAVE_CLK
189 struct clk *clk; 188 struct clk *clk;
190#endif
191 189
192 /* physical base address of controller */ 190 /* physical base address of controller */
193 dma_addr_t pbase; 191 dma_addr_t pbase;
@@ -312,13 +310,11 @@ static int cf_init(struct arasan_cf_dev *acdev)
312 unsigned long flags; 310 unsigned long flags;
313 int ret = 0; 311 int ret = 0;
314 312
315#ifdef CONFIG_HAVE_CLK
316 ret = clk_enable(acdev->clk); 313 ret = clk_enable(acdev->clk);
317 if (ret) { 314 if (ret) {
318 dev_dbg(acdev->host->dev, "clock enable failed"); 315 dev_dbg(acdev->host->dev, "clock enable failed");
319 return ret; 316 return ret;
320 } 317 }
321#endif
322 318
323 spin_lock_irqsave(&acdev->host->lock, flags); 319 spin_lock_irqsave(&acdev->host->lock, flags);
324 /* configure CF interface clock */ 320 /* configure CF interface clock */
@@ -344,9 +340,7 @@ static void cf_exit(struct arasan_cf_dev *acdev)
344 writel(readl(acdev->vbase + OP_MODE) & ~CFHOST_ENB, 340 writel(readl(acdev->vbase + OP_MODE) & ~CFHOST_ENB,
345 acdev->vbase + OP_MODE); 341 acdev->vbase + OP_MODE);
346 spin_unlock_irqrestore(&acdev->host->lock, flags); 342 spin_unlock_irqrestore(&acdev->host->lock, flags);
347#ifdef CONFIG_HAVE_CLK
348 clk_disable(acdev->clk); 343 clk_disable(acdev->clk);
349#endif
350} 344}
351 345
352static void dma_callback(void *dev) 346static void dma_callback(void *dev)
@@ -828,13 +822,11 @@ static int __devinit arasan_cf_probe(struct platform_device *pdev)
828 return -ENOMEM; 822 return -ENOMEM;
829 } 823 }
830 824
831#ifdef CONFIG_HAVE_CLK
832 acdev->clk = clk_get(&pdev->dev, NULL); 825 acdev->clk = clk_get(&pdev->dev, NULL);
833 if (IS_ERR(acdev->clk)) { 826 if (IS_ERR(acdev->clk)) {
834 dev_warn(&pdev->dev, "Clock not found\n"); 827 dev_warn(&pdev->dev, "Clock not found\n");
835 return PTR_ERR(acdev->clk); 828 return PTR_ERR(acdev->clk);
836 } 829 }
837#endif
838 830
839 /* allocate host */ 831 /* allocate host */
840 host = ata_host_alloc(&pdev->dev, 1); 832 host = ata_host_alloc(&pdev->dev, 1);
@@ -899,9 +891,7 @@ static int __devinit arasan_cf_probe(struct platform_device *pdev)
899 &arasan_cf_sht); 891 &arasan_cf_sht);
900 892
901free_clk: 893free_clk:
902#ifdef CONFIG_HAVE_CLK
903 clk_put(acdev->clk); 894 clk_put(acdev->clk);
904#endif
905 return ret; 895 return ret;
906} 896}
907 897
@@ -912,9 +902,7 @@ static int __devexit arasan_cf_remove(struct platform_device *pdev)
912 902
913 ata_host_detach(host); 903 ata_host_detach(host);
914 cf_exit(acdev); 904 cf_exit(acdev);
915#ifdef CONFIG_HAVE_CLK
916 clk_put(acdev->clk); 905 clk_put(acdev->clk);
917#endif
918 906
919 return 0; 907 return 0;
920} 908}