Skip to content

Commit

Permalink
cpufreq: ACPI / CPPC: Add module support for cppc_cpufreq driver
Browse files Browse the repository at this point in the history
Add a function to cleanup at module exit and export
appropriate GPL string to enable moduler support
for the cppc_cpufreq driver.

Reported-by: Srinivas Pandruvada <[email protected]>
Signed-off-by: Ashwin Chaugule <[email protected]>
Signed-off-by: Rafael J. Wysocki <[email protected]>
  • Loading branch information
Ashwin Chaugule authored and rafaeljw committed Apr 25, 2016
1 parent bdcaa23 commit a29a1e7
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions drivers/cpufreq/cppc_cpufreq.c
Original file line number Diff line number Diff line change
Expand Up @@ -173,4 +173,25 @@ static int __init cppc_cpufreq_init(void)
return -ENODEV;
}

static void __exit cppc_cpufreq_exit(void)
{
struct cpudata *cpu;
int i;

cpufreq_unregister_driver(&cppc_cpufreq_driver);

for_each_possible_cpu(i) {
cpu = all_cpu_data[i];
free_cpumask_var(cpu->shared_cpu_map);
kfree(cpu);
}

kfree(all_cpu_data);
}

module_exit(cppc_cpufreq_exit);
MODULE_AUTHOR("Ashwin Chaugule");
MODULE_DESCRIPTION("CPUFreq driver based on the ACPI CPPC v5.0+ spec");
MODULE_LICENSE("GPL");

late_initcall(cppc_cpufreq_init);

0 comments on commit a29a1e7

Please sign in to comment.