Re: [PATCH 1/5] ACPI processor: Do not export acpi_idle_driver in processor.h
From: Len Brown <lenb@kernel.org>
Date: 2012-01-17 11:25:11
On 11/17/2011 05:36 PM, Thomas Renninger wrote:
Instead move its declaration from processor_idle.c to processor_driver.c and declare it static as it's the only file using this struct. Cleanup only, no functional change. Signed-off-by: Thomas Renninger <redacted> CC: Len Brown <lenb@kernel.org> CC: linux-acpi@vger.kernel.org --- drivers/acpi/processor_driver.c | 5 +++++ drivers/acpi/processor_idle.c | 5 ----- include/acpi/processor.h | 1 - 3 files changed, 5 insertions(+), 6 deletions(-)
drivers/acpi/processor_idle.c: In function ‘acpi_processor_setup_cpuidle_states’: drivers/acpi/processor_idle.c:1032:32: error: ‘acpi_idle_driver’ undeclared (first use in this function) drivers/acpi/processor_idle.c:1032:32: note: each undeclared identifier is reported only once for each function it appears in drivers/acpi/processor_idle.c: In function ‘acpi_processor_cst_has_changed’: drivers/acpi/processor_idle.c:1158:29: error: ‘acpi_idle_driver’ undeclared (first use in this function) drivers/acpi/processor_idle.c: In function ‘acpi_processor_power_init’: drivers/acpi/processor_idle.c:1239:38: error: ‘acpi_idle_driver’ undeclared (first use in this function) drivers/acpi/processor_idle.c: In function ‘acpi_processor_power_exit’: drivers/acpi/processor_idle.c:1270:31: error: ‘acpi_idle_driver’ undeclared (first use in this function) eh?
quoted hunk ↗ jump to hunk
diff --git a/drivers/acpi/processor_driver.c b/drivers/acpi/processor_driver.c index a4e0f1b..3a4fc0c 100644 --- a/drivers/acpi/processor_driver.c +++ b/drivers/acpi/processor_driver.c@@ -106,6 +106,11 @@ static struct acpi_driver acpi_processor_driver = { }, }; +static struct cpuidle_driver acpi_idle_driver = { + .name = "acpi_idle", + .owner = THIS_MODULE, +}; + #define INSTALL_NOTIFY_HANDLER 1 #define UNINSTALL_NOTIFY_HANDLER 2diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c index 9b88f98..7fed4f3 100644 --- a/drivers/acpi/processor_idle.c +++ b/drivers/acpi/processor_idle.c@@ -968,11 +968,6 @@ static int acpi_idle_enter_bm(struct cpuidle_device *dev, return idle_time; } -struct cpuidle_driver acpi_idle_driver = { - .name = "acpi_idle", - .owner = THIS_MODULE, -}; - /** * acpi_processor_setup_cpuidle - prepares and configures CPUIDLE * @pr: the ACPI processordiff --git a/include/acpi/processor.h b/include/acpi/processor.h index 67055f1..5b27bc3 100644 --- a/include/acpi/processor.h +++ b/include/acpi/processor.h@@ -333,7 +333,6 @@ int acpi_processor_power_exit(struct acpi_processor *pr, struct acpi_device *device); int acpi_processor_suspend(struct acpi_device * device, pm_message_t state); int acpi_processor_resume(struct acpi_device * device); -extern struct cpuidle_driver acpi_idle_driver; /* in processor_thermal.c */ int acpi_processor_get_limit_info(struct acpi_processor *pr);
-- To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html