Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge remote-tracking branch 'regulator/fix/dbx500' into regulator-linus

+12 -12
+12 -12
drivers/regulator/dbx500-prcmu.c
··· 24 24 static int power_state_active_cnt; /* will initialize to zero */ 25 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 27 void power_state_active_enable(void) 40 28 { 41 29 unsigned long flags; ··· 52 64 } 53 65 54 66 #ifdef CONFIG_REGULATOR_DEBUG 67 + 68 + static int power_state_active_get(void) 69 + { 70 + unsigned long flags; 71 + int cnt; 72 + 73 + spin_lock_irqsave(&power_state_active_lock, flags); 74 + cnt = power_state_active_cnt; 75 + spin_unlock_irqrestore(&power_state_active_lock, flags); 76 + 77 + return cnt; 78 + } 55 79 56 80 static struct ux500_regulator_debug { 57 81 struct dentry *dir;