Merge remote-tracking branch 'regulator/fix/dbx500' into regulator-linus
authorMark Brown <broonie@opensource.wolfsonmicro.com>
Thu, 30 May 2013 10:58:37 +0000 (11:58 +0100)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Thu, 30 May 2013 10:58:37 +0000 (11:58 +0100)
drivers/regulator/dbx500-prcmu.c

index 89bd2faaef8cf627cddcd9f1b7a03c9b4cab5fae..ce89f7848a57f00d58c6f879cb2b3157d28fd303 100644 (file)
 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;