login
Header Space

 
 

Re: [PATCH 1/2] acer-wmi - Fail gracefully if ACPI is disabled

Score:
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Carlos Corbacho <carlos@...>
Cc: Ingo Molnar <mingo@...>, Len Brown <lenb@...>, Andrew Morton <akpm@...>, <linux-acpi@...>, <linux-kernel@...>, <linux-pm@...>
Date: Tuesday, February 12, 2008 - 12:41 am

On Mon, 11 Feb 2008, Carlos Corbacho wrote:

Shouldn't "wmi_has_guid()" just return false if ACPI isn't enabled, and 
the drivers should just then always give up?

The proper way to get there would seem to be to just do this instead..

We should *not* add some random ACPI workarounds to individual drivers, we 
should just make the wmi subsystem so robust that nobody *cares* if acpi 
exists or is enabled on that machine.

		Linus

---
 drivers/acpi/wmi.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/acpi/wmi.c b/drivers/acpi/wmi.c
index 36b84ab..457ed3d 100644
--- a/drivers/acpi/wmi.c
+++ b/drivers/acpi/wmi.c
@@ -673,11 +673,11 @@ static int __init acpi_wmi_init(void)
 {
 	acpi_status result;
 
+	INIT_LIST_HEAD(&wmi_blocks.list);
+
 	if (acpi_disabled)
 		return -ENODEV;
 
-	INIT_LIST_HEAD(&wmi_blocks.list);
-
 	result = acpi_bus_register_driver(&acpi_wmi_driver);
 
 	if (result < 0) {
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[GIT PATCH] ACPI patches for 2.6.25-rc0 (#2), Len Brown, (Fri Feb 8, 2:45 am)
Re: [GIT PATCH] ACPI patches for 2.6.25-rc0 (#2), Ingo Molnar, (Sat Feb 9, 2:17 am)
Re: [GIT PATCH] ACPI patches for 2.6.25-rc0 (#2), Ingo Molnar, (Sat Feb 9, 2:19 am)
Re: [GIT PATCH] ACPI patches for 2.6.25-rc0 (#2), Carlos Corbacho, (Sat Feb 9, 7:42 am)
Re: [GIT PATCH] ACPI patches for 2.6.25-rc0 (#2), Ingo Molnar, (Mon Feb 11, 5:17 am)
Re: [GIT PATCH] ACPI patches for 2.6.25-rc0 (#2), Carlos Corbacho, (Mon Feb 11, 3:23 pm)
[PATCH 2/2] tc1100-wmi - Fail gracefully if ACPI is disabled, Carlos Corbacho, (Mon Feb 11, 3:55 pm)
[PATCH 1/2] acer-wmi - Fail gracefully if ACPI is disabled, Carlos Corbacho, (Mon Feb 11, 3:55 pm)
Re: [PATCH 1/2] acer-wmi - Fail gracefully if ACPI is disabled, Linus Torvalds, (Tue Feb 12, 12:41 am)
speck-geostationary