* [PATCH] ACPI / CPPC: Add module support for cppc_cpufreq driver
@ 2016-04-15 0:45 Ashwin Chaugule
2016-04-26 0:01 ` Rafael J. Wysocki
0 siblings, 1 reply; 2+ messages in thread
From: Ashwin Chaugule @ 2016-04-15 0:45 UTC (permalink / raw)
To: rjw; +Cc: srinivas.pandruvada, linux-pm, linaro-acpi, patches,
Ashwin Chaugule
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>
---
drivers/cpufreq/cppc_cpufreq.c | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)
diff --git a/drivers/cpufreq/cppc_cpufreq.c b/drivers/cpufreq/cppc_cpufreq.c
index 7c0bdfb..8882b8e 100644
--- a/drivers/cpufreq/cppc_cpufreq.c
+++ b/drivers/cpufreq/cppc_cpufreq.c
@@ -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);
--
1.9.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] ACPI / CPPC: Add module support for cppc_cpufreq driver
2016-04-15 0:45 [PATCH] ACPI / CPPC: Add module support for cppc_cpufreq driver Ashwin Chaugule
@ 2016-04-26 0:01 ` Rafael J. Wysocki
0 siblings, 0 replies; 2+ messages in thread
From: Rafael J. Wysocki @ 2016-04-26 0:01 UTC (permalink / raw)
To: Ashwin Chaugule; +Cc: srinivas.pandruvada, linux-pm, linaro-acpi, patches
On Thursday, April 14, 2016 08:45:53 PM Ashwin Chaugule wrote:
> 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>
Applied, thanks!
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-04-25 23:58 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-04-15 0:45 [PATCH] ACPI / CPPC: Add module support for cppc_cpufreq driver Ashwin Chaugule
2016-04-26 0:01 ` Rafael J. Wysocki
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).