diff options
Diffstat (limited to 'drivers/cpuidle')
-rw-r--r-- | drivers/cpuidle/cpuidle.c | 2 | ||||
-rw-r--r-- | drivers/cpuidle/governors/menu.c | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/drivers/cpuidle/cpuidle.c b/drivers/cpuidle/cpuidle.c index 61c417b9e53f..3b80b77a585d 100644 --- a/drivers/cpuidle/cpuidle.c +++ b/drivers/cpuidle/cpuidle.c | |||
@@ -249,7 +249,7 @@ int cpuidle_enter(struct cpuidle_driver *drv, struct cpuidle_device *dev, | |||
249 | */ | 249 | */ |
250 | void cpuidle_reflect(struct cpuidle_device *dev, int index) | 250 | void cpuidle_reflect(struct cpuidle_device *dev, int index) |
251 | { | 251 | { |
252 | if (cpuidle_curr_governor->reflect) | 252 | if (cpuidle_curr_governor->reflect && index >= 0) |
253 | cpuidle_curr_governor->reflect(dev, index); | 253 | cpuidle_curr_governor->reflect(dev, index); |
254 | } | 254 | } |
255 | 255 | ||
diff --git a/drivers/cpuidle/governors/menu.c b/drivers/cpuidle/governors/menu.c index b8a5fa15ca24..22e4463d1787 100644 --- a/drivers/cpuidle/governors/menu.c +++ b/drivers/cpuidle/governors/menu.c | |||
@@ -367,9 +367,9 @@ static int menu_select(struct cpuidle_driver *drv, struct cpuidle_device *dev) | |||
367 | static void menu_reflect(struct cpuidle_device *dev, int index) | 367 | static void menu_reflect(struct cpuidle_device *dev, int index) |
368 | { | 368 | { |
369 | struct menu_device *data = this_cpu_ptr(&menu_devices); | 369 | struct menu_device *data = this_cpu_ptr(&menu_devices); |
370 | |||
370 | data->last_state_idx = index; | 371 | data->last_state_idx = index; |
371 | if (index >= 0) | 372 | data->needs_update = 1; |
372 | data->needs_update = 1; | ||
373 | } | 373 | } |
374 | 374 | ||
375 | /** | 375 | /** |