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: <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>, <spear-devel@list.st.com>,
	<viresh.linux@gmail.com>, Viresh Kumar <viresh.kumar@st.com>,
	<linux-ide@vger.kernel.org>
Subject: [PATCH V2 4/9] ata/sata_mv: Remove conditional compilation of clk code
Date: Tue, 24 Apr 2012 11:26:12 +0530	[thread overview]
Message-ID: <5c57f2a0eb759c864a88bb5cd2e98e397f05ca61.1335246730.git.viresh.kumar@st.com> (raw)
In-Reply-To: <cover.1335246730.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: Jeff Garzik <jgarzik@redhat.com>
Cc: linux-ide@vger.kernel.org
---
 drivers/ata/sata_mv.c |   10 ----------
 1 files changed, 0 insertions(+), 10 deletions(-)

diff --git a/drivers/ata/sata_mv.c b/drivers/ata/sata_mv.c
index 7336d4a..37503b8 100644
--- a/drivers/ata/sata_mv.c
+++ b/drivers/ata/sata_mv.c
@@ -551,9 +551,7 @@ struct mv_host_priv {
 	u32			irq_mask_offset;
 	u32			unmask_all_irqs;
 
-#if defined(CONFIG_HAVE_CLK)
 	struct clk		*clk;
-#endif
 	/*
 	 * These consistent DMA memory pools give us guaranteed
 	 * alignment for hardware-accessed data structures,
@@ -4063,13 +4061,11 @@ static int mv_platform_probe(struct platform_device *pdev)
 				   resource_size(res));
 	hpriv->base -= SATAHC0_REG_BASE;
 
-#if defined(CONFIG_HAVE_CLK)
 	hpriv->clk = clk_get(&pdev->dev, NULL);
 	if (IS_ERR(hpriv->clk))
 		dev_notice(&pdev->dev, "cannot get clkdev\n");
 	else
 		clk_enable(hpriv->clk);
-#endif
 
 	/*
 	 * (Re-)program MBUS remapping windows if we are asked to.
@@ -4096,12 +4092,10 @@ static int mv_platform_probe(struct platform_device *pdev)
 		return 0;
 
 err:
-#if defined(CONFIG_HAVE_CLK)
 	if (!IS_ERR(hpriv->clk)) {
 		clk_disable(hpriv->clk);
 		clk_put(hpriv->clk);
 	}
-#endif
 
 	return rc;
 }
@@ -4117,17 +4111,13 @@ err:
 static int __devexit mv_platform_remove(struct platform_device *pdev)
 {
 	struct ata_host *host = platform_get_drvdata(pdev);
-#if defined(CONFIG_HAVE_CLK)
 	struct mv_host_priv *hpriv = host->private_data;
-#endif
 	ata_host_detach(host);
 
-#if defined(CONFIG_HAVE_CLK)
 	if (!IS_ERR(hpriv->clk)) {
 		clk_disable(hpriv->clk);
 		clk_put(hpriv->clk);
 	}
-#endif
 	return 0;
 }
 
-- 
1.7.9


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

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-24  5:56 [PATCH V2 0/9] clk: Add non CONFIG_HAVE_CLK routines Viresh Kumar
2012-04-24  5:56 ` [PATCH V2 1/9] " Viresh Kumar
2012-04-24  5:56 ` [PATCH V2 2/9] clk: Remove redundant depends on from drivers/Kconfig Viresh Kumar
2012-04-24  5:56 ` [PATCH V2 3/9] ata/pata_arasan: Remove conditional compilation of clk code Viresh Kumar
2012-04-24  5:56 ` Viresh Kumar [this message]
2012-04-24  5:56 ` [PATCH V2 5/9] net/c_can: " Viresh Kumar
2012-04-24  5:56 ` [PATCH V2 6/9] net/stmmac: " Viresh Kumar
2012-04-24  6:16   ` Giuseppe CAVALLARO
2012-04-24  6:33     ` Giuseppe CAVALLARO
2012-04-24  6:42       ` Viresh Kumar
2012-04-24  8:24         ` Giuseppe CAVALLARO
2012-04-24  5:56 ` [PATCH V2 7/9] gadget/m66592: " Viresh Kumar
2012-04-24  5:56 ` [PATCH V2 8/9] gadget/r8a66597: " Viresh Kumar
2012-04-24  5:56 ` [PATCH V2 9/9] usb/host/r8a66597: " Viresh Kumar
2012-04-24  7:04 [PATCH V2 4/9] ata/sata_mv: " Andrew Lunn
2012-04-24  7:05 ` Viresh Kumar
2012-04-24  7:26   ` Andrew Lunn
2012-04-24  7:42     ` Russell King - ARM Linux
2012-04-24  7:58       ` Viresh Kumar
2012-04-24  8:26         ` Russell King - ARM Linux
2012-04-24  8:30           ` Viresh Kumar
2012-04-24 12:04   ` Sergei Shtylyov

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=5c57f2a0eb759c864a88bb5cd2e98e397f05ca61.1335246730.git.viresh.kumar@st.com \
    --to=viresh.kumar@st.com \
    --cc=akpm@linux-foundation.org \
    --cc=jgarzik@redhat.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-ide@vger.kernel.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®