diff options
author | Ashwin Chaugule <ashwin.chaugule@linaro.org> | 2016-04-14 20:45:53 -0400 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2016-04-25 09:59:35 -0400 |
commit | a29a1e76781d112014761ba106ab03e097cc4492 (patch) | |
tree | 943cb2fbbc1dd5561762e972144309cb3b193807 /drivers/cpufreq/cppc_cpufreq.c | |
parent | bdcaa23fb87260c8314f538f444ee845ea51e15d (diff) |
cpufreq: ACPI / CPPC: Add module support for cppc_cpufreq driver
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>
Diffstat (limited to 'drivers/cpufreq/cppc_cpufreq.c')
-rw-r--r-- | drivers/cpufreq/cppc_cpufreq.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/drivers/cpufreq/cppc_cpufreq.c b/drivers/cpufreq/cppc_cpufreq.c index 7c0bdfb1a2ca..8882b8e2ecd0 100644 --- a/drivers/cpufreq/cppc_cpufreq.c +++ b/drivers/cpufreq/cppc_cpufreq.c | |||
@@ -173,4 +173,25 @@ out: | |||
173 | return -ENODEV; | 173 | return -ENODEV; |
174 | } | 174 | } |
175 | 175 | ||
176 | static void __exit cppc_cpufreq_exit(void) | ||
177 | { | ||
178 | struct cpudata *cpu; | ||
179 | int i; | ||
180 | |||
181 | cpufreq_unregister_driver(&cppc_cpufreq_driver); | ||
182 | |||
183 | for_each_possible_cpu(i) { | ||
184 | cpu = all_cpu_data[i]; | ||
185 | free_cpumask_var(cpu->shared_cpu_map); | ||
186 | kfree(cpu); | ||
187 | } | ||
188 | |||
189 | kfree(all_cpu_data); | ||
190 | } | ||
191 | |||
192 | module_exit(cppc_cpufreq_exit); | ||
193 | MODULE_AUTHOR("Ashwin Chaugule"); | ||
194 | MODULE_DESCRIPTION("CPUFreq driver based on the ACPI CPPC v5.0+ spec"); | ||
195 | MODULE_LICENSE("GPL"); | ||
196 | |||
176 | late_initcall(cppc_cpufreq_init); | 197 | late_initcall(cppc_cpufreq_init); |