diff options
author | Paul Walmsley <paul@pwsan.com> | 2009-12-08 18:33:12 -0500 |
---|---|---|
committer | paul <paul@twilight.(none)> | 2009-12-11 19:00:41 -0500 |
commit | 2354eb5a943e64c5e6e249147381e9715aa5d54b (patch) | |
tree | 6341bf9adfb93f3a59a1476a7fc5254f24529bdd /arch/arm/mach-omap2 | |
parent | 6a06fa6863f190a0ed72f273a2ae5fedc89973ff (diff) |
OMAP powerdomain/PM: use symbolic constants for the max number of power states
Replace some bare constants with power states.
Signed-off-by: Paul Walmsley <paul@pwsan.com>
Cc: Kevin Hilman <khilman@deeprootsystems.com>
Diffstat (limited to 'arch/arm/mach-omap2')
-rw-r--r-- | arch/arm/mach-omap2/pm-debug.c | 4 | ||||
-rw-r--r-- | arch/arm/mach-omap2/powerdomain.c | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/arch/arm/mach-omap2/pm-debug.c b/arch/arm/mach-omap2/pm-debug.c index 8baa30d2acfb..860b755d2220 100644 --- a/arch/arm/mach-omap2/pm-debug.c +++ b/arch/arm/mach-omap2/pm-debug.c | |||
@@ -326,7 +326,7 @@ int pm_dbg_regset_save(int reg_set) | |||
326 | return 0; | 326 | return 0; |
327 | } | 327 | } |
328 | 328 | ||
329 | static const char pwrdm_state_names[][4] = { | 329 | static const char pwrdm_state_names[][PWRDM_MAX_PWRSTS] = { |
330 | "OFF", | 330 | "OFF", |
331 | "RET", | 331 | "RET", |
332 | "INA", | 332 | "INA", |
@@ -381,7 +381,7 @@ static int pwrdm_dbg_show_counter(struct powerdomain *pwrdm, void *user) | |||
381 | 381 | ||
382 | seq_printf(s, "%s (%s)", pwrdm->name, | 382 | seq_printf(s, "%s (%s)", pwrdm->name, |
383 | pwrdm_state_names[pwrdm->state]); | 383 | pwrdm_state_names[pwrdm->state]); |
384 | for (i = 0; i < 4; i++) | 384 | for (i = 0; i < PWRDM_MAX_PWRSTS; i++) |
385 | seq_printf(s, ",%s:%d", pwrdm_state_names[i], | 385 | seq_printf(s, ",%s:%d", pwrdm_state_names[i], |
386 | pwrdm->state_counter[i]); | 386 | pwrdm->state_counter[i]); |
387 | 387 | ||
diff --git a/arch/arm/mach-omap2/powerdomain.c b/arch/arm/mach-omap2/powerdomain.c index 41472670e4b4..1dd1a3817e8b 100644 --- a/arch/arm/mach-omap2/powerdomain.c +++ b/arch/arm/mach-omap2/powerdomain.c | |||
@@ -158,7 +158,7 @@ static __init void _pwrdm_setup(struct powerdomain *pwrdm) | |||
158 | { | 158 | { |
159 | int i; | 159 | int i; |
160 | 160 | ||
161 | for (i = 0; i < 4; i++) | 161 | for (i = 0; i < PWRDM_MAX_PWRSTS; i++) |
162 | pwrdm->state_counter[i] = 0; | 162 | pwrdm->state_counter[i] = 0; |
163 | 163 | ||
164 | pwrdm_wait_transition(pwrdm); | 164 | pwrdm_wait_transition(pwrdm); |