diff options
| -rw-r--r-- | drivers/regulator/dbx500-prcmu.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/drivers/regulator/dbx500-prcmu.c b/drivers/regulator/dbx500-prcmu.c index 89bd2faaef8c..ce89f7848a57 100644 --- a/drivers/regulator/dbx500-prcmu.c +++ b/drivers/regulator/dbx500-prcmu.c | |||
| @@ -24,18 +24,6 @@ | |||
| 24 | static int power_state_active_cnt; /* will initialize to zero */ | 24 | static int power_state_active_cnt; /* will initialize to zero */ |
| 25 | static DEFINE_SPINLOCK(power_state_active_lock); | 25 | static DEFINE_SPINLOCK(power_state_active_lock); |
| 26 | 26 | ||
| 27 | int power_state_active_get(void) | ||
| 28 | { | ||
| 29 | unsigned long flags; | ||
| 30 | int cnt; | ||
| 31 | |||
| 32 | spin_lock_irqsave(&power_state_active_lock, flags); | ||
| 33 | cnt = power_state_active_cnt; | ||
| 34 | spin_unlock_irqrestore(&power_state_active_lock, flags); | ||
| 35 | |||
| 36 | return cnt; | ||
| 37 | } | ||
| 38 | |||
| 39 | void power_state_active_enable(void) | 27 | void power_state_active_enable(void) |
| 40 | { | 28 | { |
| 41 | unsigned long flags; | 29 | unsigned long flags; |
| @@ -65,6 +53,18 @@ out: | |||
| 65 | 53 | ||
| 66 | #ifdef CONFIG_REGULATOR_DEBUG | 54 | #ifdef CONFIG_REGULATOR_DEBUG |
| 67 | 55 | ||
| 56 | static int power_state_active_get(void) | ||
| 57 | { | ||
| 58 | unsigned long flags; | ||
| 59 | int cnt; | ||
| 60 | |||
| 61 | spin_lock_irqsave(&power_state_active_lock, flags); | ||
| 62 | cnt = power_state_active_cnt; | ||
| 63 | spin_unlock_irqrestore(&power_state_active_lock, flags); | ||
| 64 | |||
| 65 | return cnt; | ||
| 66 | } | ||
| 67 | |||
| 68 | static struct ux500_regulator_debug { | 68 | static struct ux500_regulator_debug { |
| 69 | struct dentry *dir; | 69 | struct dentry *dir; |
| 70 | struct dentry *status_file; | 70 | struct dentry *status_file; |
