static void __exit cpufreq_stats_exit(void) { unsigned int cpu; cpufreq_unregister_notifier(¬ifier_policy_block, CPUFREQ_POLICY_NOTIFIER); cpufreq_unregister_notifier(¬ifier_trans_block, CPUFREQ_TRANSITION_NOTIFIER); for_each_online_cpu(cpu) cpufreq_stats_free_table(cpu); cpufreq_allstats_free(); cpufreq_powerstats_free(); }
static void cpufreq_stats_cleanup(void) { unsigned int cpu; cpufreq_unregister_notifier(¬ifier_policy_block, CPUFREQ_POLICY_NOTIFIER); cpufreq_unregister_notifier(¬ifier_trans_block, CPUFREQ_TRANSITION_NOTIFIER); unregister_hotcpu_notifier(&cpufreq_stat_cpu_notifier); for_each_online_cpu(cpu) { cpufreq_stats_free_table(cpu); cpufreq_stats_free_sysfs(cpu); } cpufreq_allstats_free(); }