]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - drivers/cpuidle/governors/menu.c
cpuidle: Move dev->last_residency update to driver enter routine; remove dev->last_state
[karo-tx-linux.git] / drivers / cpuidle / governors / menu.c
index c47f3d09c1eeb6184420632a78e892f125c36bf8..e4b200c5b441e2384dc2c0ee8bb3263f221c5f29 100644 (file)
@@ -310,14 +310,17 @@ static int menu_select(struct cpuidle_device *dev)
 /**
  * menu_reflect - records that data structures need update
  * @dev: the CPU
+ * @index: the index of actual entered state
  *
  * NOTE: it's important to be fast here because this operation will add to
  *       the overall exit latency.
  */
-static void menu_reflect(struct cpuidle_device *dev)
+static void menu_reflect(struct cpuidle_device *dev, int index)
 {
        struct menu_device *data = &__get_cpu_var(menu_devices);
-       data->needs_update = 1;
+       data->last_state_idx = index;
+       if (index >= 0)
+               data->needs_update = 1;
 }
 
 /**