diff options
author | Viresh Kumar <viresh.kumar@st.com> | 2012-07-30 17:39:49 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-07-30 20:25:12 -0400 |
commit | c311b78b2a2fc644da2e748b7999b9ff081ec00e (patch) | |
tree | 2b2e0f9818d57d179ff2c6c84fd8ab5103b36169 | |
parent | 569a50da7fe5144ac3831ffa6f400aa276b9781a (diff) |
usb/host/r8a66597: 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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
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>
-rw-r--r-- | drivers/usb/host/r8a66597-hcd.c | 12 | ||||
-rw-r--r-- | drivers/usb/host/r8a66597.h | 5 |
2 files changed, 0 insertions, 17 deletions
diff --git a/drivers/usb/host/r8a66597-hcd.c b/drivers/usb/host/r8a66597-hcd.c index c868be65e763..4c634eb56358 100644 --- a/drivers/usb/host/r8a66597-hcd.c +++ b/drivers/usb/host/r8a66597-hcd.c | |||
@@ -95,9 +95,7 @@ static int r8a66597_clock_enable(struct r8a66597 *r8a66597) | |||
95 | int i = 0; | 95 | int i = 0; |
96 | 96 | ||
97 | if (r8a66597->pdata->on_chip) { | 97 | if (r8a66597->pdata->on_chip) { |
98 | #ifdef CONFIG_HAVE_CLK | ||
99 | clk_enable(r8a66597->clk); | 98 | clk_enable(r8a66597->clk); |
100 | #endif | ||
101 | do { | 99 | do { |
102 | r8a66597_write(r8a66597, SCKE, SYSCFG0); | 100 | r8a66597_write(r8a66597, SCKE, SYSCFG0); |
103 | tmp = r8a66597_read(r8a66597, SYSCFG0); | 101 | tmp = r8a66597_read(r8a66597, SYSCFG0); |
@@ -141,9 +139,7 @@ static void r8a66597_clock_disable(struct r8a66597 *r8a66597) | |||
141 | udelay(1); | 139 | udelay(1); |
142 | 140 | ||
143 | if (r8a66597->pdata->on_chip) { | 141 | if (r8a66597->pdata->on_chip) { |
144 | #ifdef CONFIG_HAVE_CLK | ||
145 | clk_disable(r8a66597->clk); | 142 | clk_disable(r8a66597->clk); |
146 | #endif | ||
147 | } else { | 143 | } else { |
148 | r8a66597_bclr(r8a66597, PLLC, SYSCFG0); | 144 | r8a66597_bclr(r8a66597, PLLC, SYSCFG0); |
149 | r8a66597_bclr(r8a66597, XCKE, SYSCFG0); | 145 | r8a66597_bclr(r8a66597, XCKE, SYSCFG0); |
@@ -2406,19 +2402,15 @@ static int __devexit r8a66597_remove(struct platform_device *pdev) | |||
2406 | del_timer_sync(&r8a66597->rh_timer); | 2402 | del_timer_sync(&r8a66597->rh_timer); |
2407 | usb_remove_hcd(hcd); | 2403 | usb_remove_hcd(hcd); |
2408 | iounmap(r8a66597->reg); | 2404 | iounmap(r8a66597->reg); |
2409 | #ifdef CONFIG_HAVE_CLK | ||
2410 | if (r8a66597->pdata->on_chip) | 2405 | if (r8a66597->pdata->on_chip) |
2411 | clk_put(r8a66597->clk); | 2406 | clk_put(r8a66597->clk); |
2412 | #endif | ||
2413 | usb_put_hcd(hcd); | 2407 | usb_put_hcd(hcd); |
2414 | return 0; | 2408 | return 0; |
2415 | } | 2409 | } |
2416 | 2410 | ||
2417 | static int __devinit r8a66597_probe(struct platform_device *pdev) | 2411 | static int __devinit r8a66597_probe(struct platform_device *pdev) |
2418 | { | 2412 | { |
2419 | #ifdef CONFIG_HAVE_CLK | ||
2420 | char clk_name[8]; | 2413 | char clk_name[8]; |
2421 | #endif | ||
2422 | struct resource *res = NULL, *ires; | 2414 | struct resource *res = NULL, *ires; |
2423 | int irq = -1; | 2415 | int irq = -1; |
2424 | void __iomem *reg = NULL; | 2416 | void __iomem *reg = NULL; |
@@ -2482,7 +2474,6 @@ static int __devinit r8a66597_probe(struct platform_device *pdev) | |||
2482 | r8a66597->irq_sense_low = irq_trigger == IRQF_TRIGGER_LOW; | 2474 | r8a66597->irq_sense_low = irq_trigger == IRQF_TRIGGER_LOW; |
2483 | 2475 | ||
2484 | if (r8a66597->pdata->on_chip) { | 2476 | if (r8a66597->pdata->on_chip) { |
2485 | #ifdef CONFIG_HAVE_CLK | ||
2486 | snprintf(clk_name, sizeof(clk_name), "usb%d", pdev->id); | 2477 | snprintf(clk_name, sizeof(clk_name), "usb%d", pdev->id); |
2487 | r8a66597->clk = clk_get(&pdev->dev, clk_name); | 2478 | r8a66597->clk = clk_get(&pdev->dev, clk_name); |
2488 | if (IS_ERR(r8a66597->clk)) { | 2479 | if (IS_ERR(r8a66597->clk)) { |
@@ -2491,7 +2482,6 @@ static int __devinit r8a66597_probe(struct platform_device *pdev) | |||
2491 | ret = PTR_ERR(r8a66597->clk); | 2482 | ret = PTR_ERR(r8a66597->clk); |
2492 | goto clean_up2; | 2483 | goto clean_up2; |
2493 | } | 2484 | } |
2494 | #endif | ||
2495 | r8a66597->max_root_hub = 1; | 2485 | r8a66597->max_root_hub = 1; |
2496 | } else | 2486 | } else |
2497 | r8a66597->max_root_hub = 2; | 2487 | r8a66597->max_root_hub = 2; |
@@ -2531,11 +2521,9 @@ static int __devinit r8a66597_probe(struct platform_device *pdev) | |||
2531 | return 0; | 2521 | return 0; |
2532 | 2522 | ||
2533 | clean_up3: | 2523 | clean_up3: |
2534 | #ifdef CONFIG_HAVE_CLK | ||
2535 | if (r8a66597->pdata->on_chip) | 2524 | if (r8a66597->pdata->on_chip) |
2536 | clk_put(r8a66597->clk); | 2525 | clk_put(r8a66597->clk); |
2537 | clean_up2: | 2526 | clean_up2: |
2538 | #endif | ||
2539 | usb_put_hcd(hcd); | 2527 | usb_put_hcd(hcd); |
2540 | 2528 | ||
2541 | clean_up: | 2529 | clean_up: |
diff --git a/drivers/usb/host/r8a66597.h b/drivers/usb/host/r8a66597.h index f28782d20eef..672cea307abb 100644 --- a/drivers/usb/host/r8a66597.h +++ b/drivers/usb/host/r8a66597.h | |||
@@ -26,10 +26,7 @@ | |||
26 | #ifndef __R8A66597_H__ | 26 | #ifndef __R8A66597_H__ |
27 | #define __R8A66597_H__ | 27 | #define __R8A66597_H__ |
28 | 28 | ||
29 | #ifdef CONFIG_HAVE_CLK | ||
30 | #include <linux/clk.h> | 29 | #include <linux/clk.h> |
31 | #endif | ||
32 | |||
33 | #include <linux/usb/r8a66597.h> | 30 | #include <linux/usb/r8a66597.h> |
34 | 31 | ||
35 | #define R8A66597_MAX_NUM_PIPE 10 | 32 | #define R8A66597_MAX_NUM_PIPE 10 |
@@ -113,9 +110,7 @@ struct r8a66597_root_hub { | |||
113 | struct r8a66597 { | 110 | struct r8a66597 { |
114 | spinlock_t lock; | 111 | spinlock_t lock; |
115 | void __iomem *reg; | 112 | void __iomem *reg; |
116 | #ifdef CONFIG_HAVE_CLK | ||
117 | struct clk *clk; | 113 | struct clk *clk; |
118 | #endif | ||
119 | struct r8a66597_platdata *pdata; | 114 | struct r8a66597_platdata *pdata; |
120 | struct r8a66597_device device0; | 115 | struct r8a66597_device device0; |
121 | struct r8a66597_root_hub root_hub[R8A66597_MAX_ROOT_HUB]; | 116 | struct r8a66597_root_hub root_hub[R8A66597_MAX_ROOT_HUB]; |