Merge branch 'acpi-pnp'
[linux-2.6-microblaze.git] / drivers / cpuidle / governors / ladder.c
index 9f08e8c..044ee0d 100644 (file)
@@ -144,7 +144,7 @@ static int ladder_enable_device(struct cpuidle_driver *drv,
 
        ldev->last_state_idx = CPUIDLE_DRIVER_STATE_START;
 
-       for (i = 0; i < drv->state_count; i++) {
+       for (i = CPUIDLE_DRIVER_STATE_START; i < drv->state_count; i++) {
                state = &drv->states[i];
                lstate = &ldev->states[i];
 
@@ -156,7 +156,7 @@ static int ladder_enable_device(struct cpuidle_driver *drv,
 
                if (i < drv->state_count - 1)
                        lstate->threshold.promotion_time = state->exit_latency;
-               if (i > 0)
+               if (i > CPUIDLE_DRIVER_STATE_START)
                        lstate->threshold.demotion_time = state->exit_latency;
        }