aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/cpuidle/cpuidle.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/cpuidle/cpuidle.c')
-rw-r--r--drivers/cpuidle/cpuidle.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/cpuidle/cpuidle.c b/drivers/cpuidle/cpuidle.c
index f66bcf9bfe93..7127e92fa8a1 100644
--- a/drivers/cpuidle/cpuidle.c
+++ b/drivers/cpuidle/cpuidle.c
@@ -105,9 +105,9 @@ int cpuidle_idle_call(void)
105 /* This can be moved to within driver enter routine 105 /* This can be moved to within driver enter routine
106 * but that results in multiple copies of same code. 106 * but that results in multiple copies of same code.
107 */ 107 */
108 dev->states[entered_state].time += 108 dev->states_usage[entered_state].time +=
109 (unsigned long long)dev->last_residency; 109 (unsigned long long)dev->last_residency;
110 dev->states[entered_state].usage++; 110 dev->states_usage[entered_state].usage++;
111 } 111 }
112 112
113 /* give the governor an opportunity to reflect on the outcome */ 113 /* give the governor an opportunity to reflect on the outcome */
@@ -186,8 +186,9 @@ static int poll_idle(struct cpuidle_device *dev, int index)
186static void poll_idle_init(struct cpuidle_device *dev) 186static void poll_idle_init(struct cpuidle_device *dev)
187{ 187{
188 struct cpuidle_state *state = &dev->states[0]; 188 struct cpuidle_state *state = &dev->states[0];
189 struct cpuidle_state_usage *state_usage = &dev->states_usage[0];
189 190
190 cpuidle_set_statedata(state, NULL); 191 cpuidle_set_statedata(state_usage, NULL);
191 192
192 snprintf(state->name, CPUIDLE_NAME_LEN, "POLL"); 193 snprintf(state->name, CPUIDLE_NAME_LEN, "POLL");
193 snprintf(state->desc, CPUIDLE_DESC_LEN, "CPUIDLE CORE POLL IDLE"); 194 snprintf(state->desc, CPUIDLE_DESC_LEN, "CPUIDLE CORE POLL IDLE");
@@ -235,8 +236,8 @@ int cpuidle_enable_device(struct cpuidle_device *dev)
235 goto fail_sysfs; 236 goto fail_sysfs;
236 237
237 for (i = 0; i < dev->state_count; i++) { 238 for (i = 0; i < dev->state_count; i++) {
238 dev->states[i].usage = 0; 239 dev->states_usage[i].usage = 0;
239 dev->states[i].time = 0; 240 dev->states_usage[i].time = 0;
240 } 241 }
241 dev->last_residency = 0; 242 dev->last_residency = 0;
242 243