static void cpufreq_allstats_free(void)
{
- int i;
+ int cpu;
struct all_cpufreq_stats *all_stat;
sysfs_remove_file(cpufreq_global_kobject,
&_attr_all_time_in_state.attr);
- for (i = 0; i < total_cpus; i++) {
- all_stat = per_cpu(all_cpufreq_stats, i);
+ for_each_possible_cpu(cpu) {
+ all_stat = per_cpu(all_cpufreq_stats, cpu);
if (!all_stat)
continue;
kfree(all_stat->time_in_state);
kfree(all_stat);
- per_cpu(all_cpufreq_stats, i) = NULL;
+ per_cpu(all_cpufreq_stats, cpu) = NULL;
}
if (all_freq_table) {
kfree(all_freq_table->freq_table);