Commit 3d75095a533aa3bbad652369ffde4c129781b8ec
Committed by
Mark Brown
1 parent
c1be5a5b1b
Exists in
smarc-l5.0.0_1.0.0-ga
and in
5 other branches
regulator: dbx500: Make local symbol static
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> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Showing 1 changed file with 12 additions and 12 deletions Side-by-side Diff
drivers/regulator/dbx500-prcmu.c
... | ... | @@ -24,18 +24,6 @@ |
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; |
... | ... | @@ -64,6 +52,18 @@ |
64 | 52 | } |
65 | 53 | |
66 | 54 | #ifdef CONFIG_REGULATOR_DEBUG |
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 | 67 | |
68 | 68 | static struct ux500_regulator_debug { |
69 | 69 | struct dentry *dir; |