Skip to contentSkip to conversation

cpufreq/CPPC: Add MODULE_DEVICE_TABLE for cppc_cpufreq driver

PATCH Applied Prashanth Prakash 2 participants 3 messages Oct 14, 2016 – Nov 14, 2016

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 cpufreq/CPPC: Add MODULE_DEVICE_TABLE for cppc_cpufreq driver

MODULE_DEVICE_TABLE is added so that CPPC cpufreq module can be automatically loaded when we have a acpi processor device with "ACPI0007" hid.

---
 drivers/cpufreq/cppc_cpufreq.c | 7 +++++++
 1 file changed, 7 insertions(+)
drivers/cpufreq/cppc_cpufreq.c +7 -0
index 4852d9e..e82bb3c 100644
@@ -247,3 +247,10 @@ MODULE_DESCRIPTION("CPUFreq driver based on the ACPI CPPC v5.0+ spec");
 MODULE_LICENSE("GPL");
 
 late_initcall(cppc_cpufreq_init);
+
+static const struct acpi_device_id cppc_acpi_ids[] = {
+	{ACPI_PROCESSOR_DEVICE_HID, },
+	{}
+};
+
+MODULE_DEVICE_TABLE(acpi, cppc_acpi_ids);
Signature · 3 lines
Qualcomm Datacenter Technologies on behalf of Qualcomm Technologies, Inc.
Qualcomm Technologies, Inc. is a member of the
Code Aurora Forum, a Linux Foundation Collaborative Project.
#1 lore raw
Quoted 14 lines · Prashanth Prakash

MODULE_DEVICE_TABLE is added so that CPPC cpufreq module can be automatically loaded when we have a acpi processor device with "ACPI0007" hid.

---
 drivers/cpufreq/cppc_cpufreq.c | 7 +++++++
 1 file changed, 7 insertions(+)
drivers/cpufreq/cppc_cpufreq.c +0 -0
index 4852d9e..e82bb3c 100644

drivers/cpufreq/cppc_cpufreq.c MODULE_DESCRIPTION("CPUFreq driver based on the ACPI CPPC v5.0+ spec"); · line 256

Quoted 10 lines
drivers/cpufreq/cppc_cpufreq.c +7 -0
@@ -247,3 +247,10 @@ MODULE_DESCRIPTION("CPUFreq driver based on the ACPI CPPC v5.0+ spec");
 MODULE_LICENSE("GPL");
 
 late_initcall(cppc_cpufreq_init);
+
+static const struct acpi_device_id cppc_acpi_ids[] = {
+	{ACPI_PROCESSOR_DEVICE_HID, },
+	{}
+};
+
+MODULE_DEVICE_TABLE(acpi, cppc_acpi_ids);

Applied.

Thanks,
Rafael

#2 lore raw
Quoted 17 lines · Rafael J. Wysocki
Quoted 16 lines · Prashanth Prakash

MODULE_DEVICE_TABLE is added so that CPPC cpufreq module can be automatically loaded when we have a acpi processor device with "ACPI0007" hid.

---
 drivers/cpufreq/cppc_cpufreq.c | 7 +++++++
 1 file changed, 7 insertions(+)
drivers/cpufreq/cppc_cpufreq.c +0 -0
index 4852d9e..e82bb3c 100644
@@ -247,3 +247,10 @@ MODULE_DESCRIPTION("CPUFreq driver based on the ACPI CPPC v5.0+ spec");
 MODULE_LICENSE("GPL");
 
Quoted 9 lines

drivers/cpufreq/cppc_cpufreq.c MODULE_DESCRIPTION("CPUFreq driver based on the ACPI CPPC v5.0+ spec"); · line 256

Quoted 8 lines
drivers/cpufreq/cppc_cpufreq.c +7 -0
 late_initcall(cppc_cpufreq_init);
+
+static const struct acpi_device_id cppc_acpi_ids[] = {
+	{ACPI_PROCESSOR_DEVICE_HID, },
+	{}
+};
+
+MODULE_DEVICE_TABLE(acpi, cppc_acpi_ids);

Applied.

Thanks Rafael!