mirror of
https://github.com/FEX-Emu/linux.git
synced 2025-01-05 17:01:17 +00:00
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>
This commit is contained in:
parent
d14fb1e930
commit
2b1463ddde
@ -74,7 +74,6 @@ static int __devinit c_can_plat_probe(struct platform_device *pdev)
|
|||||||
const struct platform_device_id *id;
|
const struct platform_device_id *id;
|
||||||
struct resource *mem;
|
struct resource *mem;
|
||||||
int irq;
|
int irq;
|
||||||
#ifdef CONFIG_HAVE_CLK
|
|
||||||
struct clk *clk;
|
struct clk *clk;
|
||||||
|
|
||||||
/* get the appropriate clk */
|
/* get the appropriate clk */
|
||||||
@ -84,7 +83,6 @@ static int __devinit c_can_plat_probe(struct platform_device *pdev)
|
|||||||
ret = -ENODEV;
|
ret = -ENODEV;
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
/* get the platform data */
|
/* get the platform data */
|
||||||
mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
||||||
@ -145,10 +143,8 @@ static int __devinit c_can_plat_probe(struct platform_device *pdev)
|
|||||||
|
|
||||||
dev->irq = irq;
|
dev->irq = irq;
|
||||||
priv->base = addr;
|
priv->base = addr;
|
||||||
#ifdef CONFIG_HAVE_CLK
|
|
||||||
priv->can.clock.freq = clk_get_rate(clk);
|
priv->can.clock.freq = clk_get_rate(clk);
|
||||||
priv->priv = clk;
|
priv->priv = clk;
|
||||||
#endif
|
|
||||||
|
|
||||||
platform_set_drvdata(pdev, dev);
|
platform_set_drvdata(pdev, dev);
|
||||||
SET_NETDEV_DEV(dev, &pdev->dev);
|
SET_NETDEV_DEV(dev, &pdev->dev);
|
||||||
@ -172,10 +168,8 @@ exit_iounmap:
|
|||||||
exit_release_mem:
|
exit_release_mem:
|
||||||
release_mem_region(mem->start, resource_size(mem));
|
release_mem_region(mem->start, resource_size(mem));
|
||||||
exit_free_clk:
|
exit_free_clk:
|
||||||
#ifdef CONFIG_HAVE_CLK
|
|
||||||
clk_put(clk);
|
clk_put(clk);
|
||||||
exit:
|
exit:
|
||||||
#endif
|
|
||||||
dev_err(&pdev->dev, "probe failed\n");
|
dev_err(&pdev->dev, "probe failed\n");
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
@ -196,9 +190,7 @@ static int __devexit c_can_plat_remove(struct platform_device *pdev)
|
|||||||
mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
||||||
release_mem_region(mem->start, resource_size(mem));
|
release_mem_region(mem->start, resource_size(mem));
|
||||||
|
|
||||||
#ifdef CONFIG_HAVE_CLK
|
|
||||||
clk_put(priv->priv);
|
clk_put(priv->priv);
|
||||||
#endif
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user