]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
cpufreq: ACPI / CPPC: Add module support for cppc_cpufreq driver
authorAshwin Chaugule <ashwin.chaugule@linaro.org>
Fri, 15 Apr 2016 00:45:53 +0000 (20:45 -0400)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 25 Apr 2016 13:59:35 +0000 (15:59 +0200)
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 <srinivas.pandruvada@intel.com>
Signed-off-by: Ashwin Chaugule <ashwin.chaugule@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/cpufreq/cppc_cpufreq.c

index 7c0bdfb1a2ca47ea9dcd0b36ef892274edd929b4..8882b8e2ecd0d0fe82ddd8cbb1bf8c4e29f4b886 100644 (file)
@@ -173,4 +173,25 @@ out:
        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);