]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - arch/x86/kernel/apm_32.c
Merge tag 'v4.11-rc1' into omap-for-v4.11/fixes
[karo-tx-linux.git] / arch / x86 / kernel / apm_32.c
index 45d44c173cf9e125df6f6b4bf9ae50d6ad19f393..5a414545e8a39001a1679b40012adad2ac908d7b 100644 (file)
 #include <linux/apm_bios.h>
 #include <linux/init.h>
 #include <linux/time.h>
-#include <linux/sched.h>
+#include <linux/sched/signal.h>
+#include <linux/sched/cputime.h>
 #include <linux/pm.h>
 #include <linux/capability.h>
 #include <linux/device.h>
@@ -905,8 +906,8 @@ static int apm_cpu_idle(struct cpuidle_device *dev,
 {
        static int use_apm_idle; /* = 0 */
        static unsigned int last_jiffies; /* = 0 */
-       static unsigned int last_stime; /* = 0 */
-       cputime_t stime, utime;
+       static u64 last_stime; /* = 0 */
+       u64 stime, utime;
 
        int apm_idle_done = 0;
        unsigned int jiffies_since_last_check = jiffies - last_jiffies;
@@ -919,7 +920,7 @@ recalc:
        } else if (jiffies_since_last_check > idle_period) {
                unsigned int idle_percentage;
 
-               idle_percentage = cputime_to_jiffies(stime - last_stime);
+               idle_percentage = nsecs_to_jiffies(stime - last_stime);
                idle_percentage *= 100;
                idle_percentage /= jiffies_since_last_check;
                use_apm_idle = (idle_percentage > idle_threshold);