aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/cpuidle
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/cpuidle')
-rw-r--r--drivers/cpuidle/cpuidle.c1
-rw-r--r--drivers/cpuidle/governors/menu.c3
2 files changed, 3 insertions, 1 deletions
diff --git a/drivers/cpuidle/cpuidle.c b/drivers/cpuidle/cpuidle.c
index efa9a2ca30e7..d6a533e68e0f 100644
--- a/drivers/cpuidle/cpuidle.c
+++ b/drivers/cpuidle/cpuidle.c
@@ -281,6 +281,7 @@ static void poll_idle_init(struct cpuidle_driver *drv)
281 state->power_usage = -1; 281 state->power_usage = -1;
282 state->flags = 0; 282 state->flags = 0;
283 state->enter = poll_idle; 283 state->enter = poll_idle;
284 state->disabled = false;
284} 285}
285#else 286#else
286static void poll_idle_init(struct cpuidle_driver *drv) {} 287static void poll_idle_init(struct cpuidle_driver *drv) {}
diff --git a/drivers/cpuidle/governors/menu.c b/drivers/cpuidle/governors/menu.c
index 8391d93f57d5..5b1f2c372c1f 100644
--- a/drivers/cpuidle/governors/menu.c
+++ b/drivers/cpuidle/governors/menu.c
@@ -281,6 +281,7 @@ static int menu_select(struct cpuidle_driver *drv, struct cpuidle_device *dev)
281 * unless the timer is happening really really soon. 281 * unless the timer is happening really really soon.
282 */ 282 */
283 if (data->expected_us > 5 && 283 if (data->expected_us > 5 &&
284 !drv->states[CPUIDLE_DRIVER_STATE_START].disabled &&
284 dev->states_usage[CPUIDLE_DRIVER_STATE_START].disable == 0) 285 dev->states_usage[CPUIDLE_DRIVER_STATE_START].disable == 0)
285 data->last_state_idx = CPUIDLE_DRIVER_STATE_START; 286 data->last_state_idx = CPUIDLE_DRIVER_STATE_START;
286 287
@@ -292,7 +293,7 @@ static int menu_select(struct cpuidle_driver *drv, struct cpuidle_device *dev)
292 struct cpuidle_state *s = &drv->states[i]; 293 struct cpuidle_state *s = &drv->states[i];
293 struct cpuidle_state_usage *su = &dev->states_usage[i]; 294 struct cpuidle_state_usage *su = &dev->states_usage[i];
294 295
295 if (su->disable) 296 if (s->disabled || su->disable)
296 continue; 297 continue;
297 if (s->target_residency > data->predicted_us) 298 if (s->target_residency > data->predicted_us)
298 continue; 299 continue;