]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blobdiff - drivers/cpufreq/cpufreq_stats.c
[S390] cputime: add sparse checking and cleanup
[mirror_ubuntu-artful-kernel.git] / drivers / cpufreq / cpufreq_stats.c
index c5072a91e8489de1464ea2e1594c7faf7432f597..2a508edd768b9c24c67c45fd8fb86caeae3354c3 100644 (file)
@@ -61,9 +61,8 @@ static int cpufreq_stats_update(unsigned int cpu)
        spin_lock(&cpufreq_stats_lock);
        stat = per_cpu(cpufreq_stats_table, cpu);
        if (stat->time_in_state)
-               stat->time_in_state[stat->last_index] =
-                       cputime64_add(stat->time_in_state[stat->last_index],
-                                     cputime_sub(cur_time, stat->last_time));
+               stat->time_in_state[stat->last_index] +=
+                       cur_time - stat->last_time;
        stat->last_time = cur_time;
        spin_unlock(&cpufreq_stats_lock);
        return 0;