net/c_can: remove conditional compilation of clk code
authorViresh Kumar <[email protected]>
Mon, 30 Jul 2012 21:39:38 +0000 (14:39 -0700)
committerLinus Torvalds <[email protected]>
Tue, 31 Jul 2012 00:25:12 +0000 (17:25 -0700)
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 <[email protected]>
Acked-by: David S. Miller <[email protected]>
Cc: Bhupesh Sharma <[email protected]>
Cc: Russell King <[email protected]>
Cc: Mike Turquette <[email protected]>
Cc: Sergei Shtylyov <[email protected]>
Cc: viresh kumar <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
drivers/net/can/c_can/c_can_platform.c

index f0921d16f0a941ff5049fd8ce18dff6c379b76f9..6ff7ad006c300b5a9c499e6bf3465e4cb8b7f2bc 100644 (file)
@@ -74,7 +74,6 @@ static int __devinit c_can_plat_probe(struct platform_device *pdev)
        const struct platform_device_id *id;
        struct resource *mem;
        int irq;
-#ifdef CONFIG_HAVE_CLK
        struct clk *clk;
 
        /* get the appropriate clk */
@@ -84,7 +83,6 @@ static int __devinit c_can_plat_probe(struct platform_device *pdev)
                ret = -ENODEV;
                goto exit;
        }
-#endif
 
        /* get the platform data */
        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;
        priv->base = addr;
-#ifdef CONFIG_HAVE_CLK
        priv->can.clock.freq = clk_get_rate(clk);
        priv->priv = clk;
-#endif
 
        platform_set_drvdata(pdev, dev);
        SET_NETDEV_DEV(dev, &pdev->dev);
@@ -172,10 +168,8 @@ exit_iounmap:
 exit_release_mem:
        release_mem_region(mem->start, resource_size(mem));
 exit_free_clk:
-#ifdef CONFIG_HAVE_CLK
        clk_put(clk);
 exit:
-#endif
        dev_err(&pdev->dev, "probe failed\n");
 
        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);
        release_mem_region(mem->start, resource_size(mem));
 
-#ifdef CONFIG_HAVE_CLK
        clk_put(priv->priv);
-#endif
 
        return 0;
 }