aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/cpuidle/governors/menu.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/cpuidle/governors/menu.c b/drivers/cpuidle/governors/menu.c
index e9a2a27134c1..115386a46e9e 100644
--- a/drivers/cpuidle/governors/menu.c
+++ b/drivers/cpuidle/governors/menu.c
@@ -124,7 +124,6 @@ struct menu_device {
124 124
125 unsigned int next_timer_us; 125 unsigned int next_timer_us;
126 unsigned int predicted_us; 126 unsigned int predicted_us;
127 unsigned int exit_us;
128 unsigned int bucket; 127 unsigned int bucket;
129 unsigned int correction_factor[BUCKETS]; 128 unsigned int correction_factor[BUCKETS];
130 unsigned int intervals[INTERVALS]; 129 unsigned int intervals[INTERVALS];
@@ -298,7 +297,6 @@ static int menu_select(struct cpuidle_driver *drv, struct cpuidle_device *dev)
298 } 297 }
299 298
300 data->last_state_idx = 0; 299 data->last_state_idx = 0;
301 data->exit_us = 0;
302 300
303 /* Special case when user has set very strict latency requirement */ 301 /* Special case when user has set very strict latency requirement */
304 if (unlikely(latency_req == 0)) 302 if (unlikely(latency_req == 0))
@@ -359,7 +357,6 @@ static int menu_select(struct cpuidle_driver *drv, struct cpuidle_device *dev)
359 continue; 357 continue;
360 358
361 data->last_state_idx = i; 359 data->last_state_idx = i;
362 data->exit_us = s->exit_latency;
363 } 360 }
364 361
365 return data->last_state_idx; 362 return data->last_state_idx;
@@ -410,8 +407,8 @@ static void menu_update(struct cpuidle_driver *drv, struct cpuidle_device *dev)
410 * We correct for the exit latency; we are assuming here that the 407 * We correct for the exit latency; we are assuming here that the
411 * exit latency happens after the event that we're interested in. 408 * exit latency happens after the event that we're interested in.
412 */ 409 */
413 if (measured_us > data->exit_us) 410 if (measured_us > target->exit_latency)
414 measured_us -= data->exit_us; 411 measured_us -= target->exit_latency;
415 412
416 413
417 /* Update our correction ratio */ 414 /* Update our correction ratio */