diff options
author | Mohammad Merajul Islam Molla <meraj.enigma@gmail.com> | 2014-07-27 23:58:50 -0400 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2014-07-28 19:31:13 -0400 |
commit | 1469244613dadeccc563982b3246500913e26d61 (patch) | |
tree | f26744c8e59b1c663bab34e1a10ce8544f5e73f1 | |
parent | 6ee7f5dd57fc2e0450d0a41ec1320c06425335e0 (diff) |
cpuidle: ladder governor - use macro instead of hardcoded value
use CPUIDLE_DRIVER_STATE_START, instead of hardcoded value 0. As,
CPUIDLE_DRIVER_STATE_START can be 1/0 based on
CONFIG_ARCH_HAS_CPU_RELAX is defined or not.
Signed-off-by: Mohammad Merajul Islam Molla <meraj.enigma@gmail.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
-rw-r--r-- | drivers/cpuidle/governors/ladder.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/cpuidle/governors/ladder.c b/drivers/cpuidle/governors/ladder.c index 9f08e8cce1af..044ee0df5871 100644 --- a/drivers/cpuidle/governors/ladder.c +++ b/drivers/cpuidle/governors/ladder.c | |||
@@ -144,7 +144,7 @@ static int ladder_enable_device(struct cpuidle_driver *drv, | |||
144 | 144 | ||
145 | ldev->last_state_idx = CPUIDLE_DRIVER_STATE_START; | 145 | ldev->last_state_idx = CPUIDLE_DRIVER_STATE_START; |
146 | 146 | ||
147 | for (i = 0; i < drv->state_count; i++) { | 147 | for (i = CPUIDLE_DRIVER_STATE_START; i < drv->state_count; i++) { |
148 | state = &drv->states[i]; | 148 | state = &drv->states[i]; |
149 | lstate = &ldev->states[i]; | 149 | lstate = &ldev->states[i]; |
150 | 150 | ||
@@ -156,7 +156,7 @@ static int ladder_enable_device(struct cpuidle_driver *drv, | |||
156 | 156 | ||
157 | if (i < drv->state_count - 1) | 157 | if (i < drv->state_count - 1) |
158 | lstate->threshold.promotion_time = state->exit_latency; | 158 | lstate->threshold.promotion_time = state->exit_latency; |
159 | if (i > 0) | 159 | if (i > CPUIDLE_DRIVER_STATE_START) |
160 | lstate->threshold.demotion_time = state->exit_latency; | 160 | lstate->threshold.demotion_time = state->exit_latency; |
161 | } | 161 | } |
162 | 162 | ||