diff options
| -rw-r--r-- | drivers/cpuidle/cpuidle.c | 6 | ||||
| -rw-r--r-- | kernel/sched/idle.c | 6 |
2 files changed, 3 insertions, 9 deletions
diff --git a/drivers/cpuidle/cpuidle.c b/drivers/cpuidle/cpuidle.c index 17a6dc0e2111..046423b0c5ca 100644 --- a/drivers/cpuidle/cpuidle.c +++ b/drivers/cpuidle/cpuidle.c | |||
| @@ -79,9 +79,9 @@ static int find_deepest_state(struct cpuidle_driver *drv, | |||
| 79 | bool freeze) | 79 | bool freeze) |
| 80 | { | 80 | { |
| 81 | unsigned int latency_req = 0; | 81 | unsigned int latency_req = 0; |
| 82 | int i, ret = -ENXIO; | 82 | int i, ret = 0; |
| 83 | 83 | ||
| 84 | for (i = 0; i < drv->state_count; i++) { | 84 | for (i = 1; i < drv->state_count; i++) { |
| 85 | struct cpuidle_state *s = &drv->states[i]; | 85 | struct cpuidle_state *s = &drv->states[i]; |
| 86 | struct cpuidle_state_usage *su = &dev->states_usage[i]; | 86 | struct cpuidle_state_usage *su = &dev->states_usage[i]; |
| 87 | 87 | ||
| @@ -243,7 +243,7 @@ int cpuidle_enter_state(struct cpuidle_device *dev, struct cpuidle_driver *drv, | |||
| 243 | * @drv: the cpuidle driver | 243 | * @drv: the cpuidle driver |
| 244 | * @dev: the cpuidle device | 244 | * @dev: the cpuidle device |
| 245 | * | 245 | * |
| 246 | * Returns the index of the idle state. | 246 | * Returns the index of the idle state. The return value must not be negative. |
| 247 | */ | 247 | */ |
| 248 | int cpuidle_select(struct cpuidle_driver *drv, struct cpuidle_device *dev) | 248 | int cpuidle_select(struct cpuidle_driver *drv, struct cpuidle_device *dev) |
| 249 | { | 249 | { |
diff --git a/kernel/sched/idle.c b/kernel/sched/idle.c index 4a2ef5a02fd3..34852ee70d54 100644 --- a/kernel/sched/idle.c +++ b/kernel/sched/idle.c | |||
| @@ -97,12 +97,6 @@ void default_idle_call(void) | |||
| 97 | static int call_cpuidle(struct cpuidle_driver *drv, struct cpuidle_device *dev, | 97 | static int call_cpuidle(struct cpuidle_driver *drv, struct cpuidle_device *dev, |
| 98 | int next_state) | 98 | int next_state) |
| 99 | { | 99 | { |
| 100 | /* Fall back to the default arch idle method on errors. */ | ||
| 101 | if (next_state < 0) { | ||
| 102 | default_idle_call(); | ||
| 103 | return next_state; | ||
| 104 | } | ||
| 105 | |||
| 106 | /* | 100 | /* |
| 107 | * The idle task must be scheduled, it is pointless to go to idle, just | 101 | * The idle task must be scheduled, it is pointless to go to idle, just |
| 108 | * update no idle residency and return. | 102 | * update no idle residency and return. |
