Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Viresh Kumar and committed by
Linus Torvalds
d14fb1e9 08aff535

+1 -13
+1 -13
drivers/ata/pata_arasan_cf.c
··· 184 184 struct arasan_cf_dev { 185 185 /* pointer to ata_host structure */ 186 186 struct ata_host *host; 187 - /* clk structure, only if HAVE_CLK is defined */ 188 - #ifdef CONFIG_HAVE_CLK 187 + /* clk structure */ 189 188 struct clk *clk; 190 - #endif 191 189 192 190 /* physical base address of controller */ 193 191 dma_addr_t pbase; ··· 310 312 unsigned long flags; 311 313 int ret = 0; 312 314 313 - #ifdef CONFIG_HAVE_CLK 314 315 ret = clk_enable(acdev->clk); 315 316 if (ret) { 316 317 dev_dbg(acdev->host->dev, "clock enable failed"); 317 318 return ret; 318 319 } 319 - #endif 320 320 321 321 spin_lock_irqsave(&acdev->host->lock, flags); 322 322 /* configure CF interface clock */ ··· 340 344 writel(readl(acdev->vbase + OP_MODE) & ~CFHOST_ENB, 341 345 acdev->vbase + OP_MODE); 342 346 spin_unlock_irqrestore(&acdev->host->lock, flags); 343 - #ifdef CONFIG_HAVE_CLK 344 347 clk_disable(acdev->clk); 345 - #endif 346 348 } 347 349 348 350 static void dma_callback(void *dev) ··· 822 828 return -ENOMEM; 823 829 } 824 830 825 - #ifdef CONFIG_HAVE_CLK 826 831 acdev->clk = clk_get(&pdev->dev, NULL); 827 832 if (IS_ERR(acdev->clk)) { 828 833 dev_warn(&pdev->dev, "Clock not found\n"); 829 834 return PTR_ERR(acdev->clk); 830 835 } 831 - #endif 832 836 833 837 /* allocate host */ 834 838 host = ata_host_alloc(&pdev->dev, 1); ··· 891 899 &arasan_cf_sht); 892 900 893 901 free_clk: 894 - #ifdef CONFIG_HAVE_CLK 895 902 clk_put(acdev->clk); 896 - #endif 897 903 return ret; 898 904 } 899 905 ··· 902 912 903 913 ata_host_detach(host); 904 914 cf_exit(acdev); 905 - #ifdef CONFIG_HAVE_CLK 906 915 clk_put(acdev->clk); 907 - #endif 908 916 909 917 return 0; 910 918 }