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.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/cpuidle/cpuidle.c b/drivers/cpuidle/cpuidle.c
index 5ce07b517c58..eb2cade562db 100644
--- a/drivers/cpuidle/cpuidle.c
+++ b/drivers/cpuidle/cpuidle.c
@@ -67,8 +67,11 @@ static void cpuidle_idle_call(void)
67 target_state = &dev->states[next_state]; 67 target_state = &dev->states[next_state];
68 68
69 /* enter the state and update stats */ 69 /* enter the state and update stats */
70 dev->last_residency = target_state->enter(dev, target_state);
71 dev->last_state = target_state; 70 dev->last_state = target_state;
71 dev->last_residency = target_state->enter(dev, target_state);
72 if (dev->last_state)
73 target_state = dev->last_state;
74
72 target_state->time += (unsigned long long)dev->last_residency; 75 target_state->time += (unsigned long long)dev->last_residency;
73 target_state->usage++; 76 target_state->usage++;
74 77