mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Viresh Kumar <viresh.kumar@st.com>
To: <akpm@linux-foundation.org>
Cc: <spear-devel@list.st.com>, <viresh.linux@gmail.com>,
	<linux-kernel@vger.kernel.org>,
	<linux-arm-kernel@lists.infradead.org>, <mturquette@linaro.org>,
	<sshtylyov@mvista.com>, <jgarzik@redhat.com>,
	<linux@arm.linux.org.uk>, Viresh Kumar <viresh.kumar@st.com>,
	"David S. Miller" <davem@davemloft.net>,
	Bhupesh Sharma <bhupesh.sharma@st.com>
Subject: [PATCH V3 08/12] net/c_can: Remove conditional compilation of clk code
Date: Tue, 24 Apr 2012 16:51:30 +0530	[thread overview]
Message-ID: <6f170bf4741a02c2dfeca73ad261fdf599abec37.1335266056.git.viresh.kumar@st.com> (raw)
In-Reply-To: <cover.1335266056.git.viresh.kumar@st.com>

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: David S. Miller <davem@davemloft.net>
Cc: Bhupesh Sharma <bhupesh.sharma@st.com>
---
 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 5e1a5ff..7ec9316 100644
--- a/drivers/net/can/c_can/c_can_platform.c
+++ b/drivers/net/can/c_can/c_can_platform.c
@@ -73,7 +73,6 @@ static int __devinit c_can_plat_probe(struct platform_device *pdev)
 	struct c_can_priv *priv;
 	struct resource *mem;
 	int irq;
-#ifdef CONFIG_HAVE_CLK
 	struct clk *clk;
 
 	/* get the appropriate clk */
@@ -83,7 +82,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);
@@ -118,10 +116,8 @@ static int __devinit c_can_plat_probe(struct platform_device *pdev)
 
 	dev->irq = irq;
 	priv->regs = addr;
-#ifdef CONFIG_HAVE_CLK
 	priv->can.clock.freq = clk_get_rate(clk);
 	priv->priv = clk;
-#endif
 
 	switch (mem->flags & IORESOURCE_MEM_TYPE_MASK) {
 	case IORESOURCE_MEM_32BIT:
@@ -157,10 +153,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;
@@ -181,9 +175,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;
 }
-- 
1.7.9


  parent reply	other threads:[~2012-04-24 11:34 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-24 11:21 [PATCH V3 00/12] clk: Add non CONFIG_HAVE_CLK routines Viresh Kumar
2012-04-24 11:21 ` [PATCH V3 01/12] " Viresh Kumar
2012-04-24 11:21 ` [PATCH V3 02/12] clk: Remove redundant depends on from drivers/Kconfig Viresh Kumar
2012-04-24 11:21 ` [PATCH V3 03/12] i2c/i2c-pxa: Remove conditional compilation of clk code Viresh Kumar
2012-04-24 11:52   ` Wolfram Sang
2012-04-24 11:21 ` [PATCH V3 04/12] usb/marvell: " Viresh Kumar
2012-04-24 11:21 ` [PATCH V3 05/12] usb/musb: " Viresh Kumar
2012-04-24 11:21 ` [PATCH V3 06/12] ata/pata_arasan: " Viresh Kumar
2012-04-24 11:21 ` [PATCH V3 07/12] ata/sata_mv: " Viresh Kumar
2012-04-24 12:00   ` Andrew Lunn
2012-04-24 12:51     ` Lothar Waßmann
2012-04-24 13:42     ` viresh kumar
2012-04-24 14:29       ` Andrew Lunn
2012-04-24 17:02         ` viresh kumar
2012-04-25  5:42           ` Andrew Lunn
2012-04-24 17:05         ` viresh kumar
2012-04-24 20:18       ` Russell King - ARM Linux
2012-04-25  3:02         ` viresh kumar
2012-04-25  5:28           ` Andrew Lunn
2012-04-25  6:43             ` Lothar Waßmann
2012-04-25  7:14               ` Andrew Lunn
2012-04-25  8:35                 ` Lothar Waßmann
2012-04-25  9:31                   ` Andrew Lunn
2012-04-25 10:37                     ` Russell King - ARM Linux
2012-04-25 11:24         ` Andrew Lunn
2012-04-24 11:21 ` Viresh Kumar [this message]
2012-04-24 11:21 ` [PATCH V3 09/12] net/stmmac: " Viresh Kumar
2012-04-24 11:21 ` [PATCH V3 10/12] gadget/m66592: " Viresh Kumar
2012-04-24 11:21 ` [PATCH V3 11/12] gadget/r8a66597: " Viresh Kumar
2012-04-24 11:21 ` [PATCH V3 12/12] usb/host/r8a66597: " Viresh Kumar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6f170bf4741a02c2dfeca73ad261fdf599abec37.1335266056.git.viresh.kumar@st.com \
    --to=viresh.kumar@st.com \
    --cc=akpm@linux-foundation.org \
    --cc=bhupesh.sharma@st.com \
    --cc=davem@davemloft.net \
    --cc=jgarzik@redhat.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=mturquette@linaro.org \
    --cc=spear-devel@list.st.com \
    --cc=sshtylyov@mvista.com \
    --cc=viresh.linux@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®