* [PATCH 1/1] regulator: dbx500: Make local symbol static
@ 2013-05-08 11:05 Sachin Kamat
2013-05-08 12:42 ` Mark Brown
0 siblings, 1 reply; 2+ messages in thread
From: Sachin Kamat @ 2013-05-08 11:05 UTC (permalink / raw)
To: linux-kernel; +Cc: broonie, lgirdwood, sachin.kamat, sundar.iyer
power_state_active_get is used only in this file. Make it static.
While at it also move this function definition inside the
CONFIG_REGULATOR_DEBUG macro as it is called only from within it.
This also avoids further build warning related to unused definition.
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
---
drivers/regulator/dbx500-prcmu.c | 24 ++++++++++++------------
1 file changed, 12 insertions(+), 12 deletions(-)
diff --git a/drivers/regulator/dbx500-prcmu.c b/drivers/regulator/dbx500-prcmu.c
index 89bd2fa..ce89f78 100644
--- a/drivers/regulator/dbx500-prcmu.c
+++ b/drivers/regulator/dbx500-prcmu.c
@@ -24,18 +24,6 @@
static int power_state_active_cnt; /* will initialize to zero */
static DEFINE_SPINLOCK(power_state_active_lock);
-int power_state_active_get(void)
-{
- unsigned long flags;
- int cnt;
-
- spin_lock_irqsave(&power_state_active_lock, flags);
- cnt = power_state_active_cnt;
- spin_unlock_irqrestore(&power_state_active_lock, flags);
-
- return cnt;
-}
-
void power_state_active_enable(void)
{
unsigned long flags;
@@ -65,6 +53,18 @@ out:
#ifdef CONFIG_REGULATOR_DEBUG
+static int power_state_active_get(void)
+{
+ unsigned long flags;
+ int cnt;
+
+ spin_lock_irqsave(&power_state_active_lock, flags);
+ cnt = power_state_active_cnt;
+ spin_unlock_irqrestore(&power_state_active_lock, flags);
+
+ return cnt;
+}
+
static struct ux500_regulator_debug {
struct dentry *dir;
struct dentry *status_file;
--
1.7.9.5
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH 1/1] regulator: dbx500: Make local symbol static
2013-05-08 11:05 [PATCH 1/1] regulator: dbx500: Make local symbol static Sachin Kamat
@ 2013-05-08 12:42 ` Mark Brown
0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2013-05-08 12:42 UTC (permalink / raw)
To: Sachin Kamat; +Cc: linux-kernel, lgirdwood, sundar.iyer
[-- Attachment #1: Type: text/plain, Size: 347 bytes --]
On Wed, May 08, 2013 at 04:35:10PM +0530, Sachin Kamat wrote:
> power_state_active_get is used only in this file. Make it static.
> While at it also move this function definition inside the
> CONFIG_REGULATOR_DEBUG macro as it is called only from within it.
> This also avoids further build warning related to unused definition.
Applied, thanks.
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-05-08 12:43 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-05-08 11:05 [PATCH 1/1] regulator: dbx500: Make local symbol static Sachin Kamat
2013-05-08 12:42 ` Mark Brown
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®