diff options
author | Viresh Kumar <viresh.kumar@st.com> | 2012-07-30 17:39:38 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-07-30 20:25:12 -0400 |
commit | 2b1463ddde35a720de2fb4013057396e7f8011f0 (patch) | |
tree | 4d4f18dc0f165978e61b8d6703e71f00800aa1ab /drivers/net | |
parent | d14fb1e93086ec1acec34d5e17c989fa528c65e5 (diff) |
net/c_can: 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>
Acked-by: David S. Miller <davem@davemloft.net>
Cc: Bhupesh Sharma <bhupesh.sharma@st.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/net')
-rw-r--r-- | drivers/net/can/c_can/c_can_platform.c | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/drivers/net/can/c_can/c_can_platform.c b/drivers/net/can/c_can/c_can_platform.c index f0921d16f0a9..6ff7ad006c30 100644 --- a/drivers/net/can/c_can/c_can_platform.c +++ b/drivers/net/can/c_can/c_can_platform.c | |||
@@ -74,7 +74,6 @@ static int __devinit c_can_plat_probe(struct platform_device *pdev) | |||
74 | const struct platform_device_id *id; | 74 | const struct platform_device_id *id; |
75 | struct resource *mem; | 75 | struct resource *mem; |
76 | int irq; | 76 | int irq; |
77 | #ifdef CONFIG_HAVE_CLK | ||
78 | struct clk *clk; | 77 | struct clk *clk; |
79 | 78 | ||
80 | /* get the appropriate clk */ | 79 | /* get the appropriate clk */ |
@@ -84,7 +83,6 @@ static int __devinit c_can_plat_probe(struct platform_device *pdev) | |||
84 | ret = -ENODEV; | 83 | ret = -ENODEV; |
85 | goto exit; | 84 | goto exit; |
86 | } | 85 | } |
87 | #endif | ||
88 | 86 | ||
89 | /* get the platform data */ | 87 | /* get the platform data */ |
90 | mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); | 88 | mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
@@ -145,10 +143,8 @@ static int __devinit c_can_plat_probe(struct platform_device *pdev) | |||
145 | 143 | ||
146 | dev->irq = irq; | 144 | dev->irq = irq; |
147 | priv->base = addr; | 145 | priv->base = addr; |
148 | #ifdef CONFIG_HAVE_CLK | ||
149 | priv->can.clock.freq = clk_get_rate(clk); | 146 | priv->can.clock.freq = clk_get_rate(clk); |
150 | priv->priv = clk; | 147 | priv->priv = clk; |
151 | #endif | ||
152 | 148 | ||
153 | platform_set_drvdata(pdev, dev); | 149 | platform_set_drvdata(pdev, dev); |
154 | SET_NETDEV_DEV(dev, &pdev->dev); | 150 | SET_NETDEV_DEV(dev, &pdev->dev); |
@@ -172,10 +168,8 @@ exit_iounmap: | |||
172 | exit_release_mem: | 168 | exit_release_mem: |
173 | release_mem_region(mem->start, resource_size(mem)); | 169 | release_mem_region(mem->start, resource_size(mem)); |
174 | exit_free_clk: | 170 | exit_free_clk: |
175 | #ifdef CONFIG_HAVE_CLK | ||
176 | clk_put(clk); | 171 | clk_put(clk); |
177 | exit: | 172 | exit: |
178 | #endif | ||
179 | dev_err(&pdev->dev, "probe failed\n"); | 173 | dev_err(&pdev->dev, "probe failed\n"); |
180 | 174 | ||
181 | return ret; | 175 | return ret; |
@@ -196,9 +190,7 @@ static int __devexit c_can_plat_remove(struct platform_device *pdev) | |||
196 | mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); | 190 | mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
197 | release_mem_region(mem->start, resource_size(mem)); | 191 | release_mem_region(mem->start, resource_size(mem)); |
198 | 192 | ||
199 | #ifdef CONFIG_HAVE_CLK | ||
200 | clk_put(priv->priv); | 193 | clk_put(priv->priv); |
201 | #endif | ||
202 | 194 | ||
203 | return 0; | 195 | return 0; |
204 | } | 196 | } |