LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Linus Torvalds <torvalds@linux-foundation.org>
To: Carlos Corbacho <carlos@strangeworlds.co.uk>
Cc: Ingo Molnar <mingo@elte.hu>, Len Brown <lenb@kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-pm@lists.linux-foundation.org
Subject: Re: [PATCH 1/2] acer-wmi - Fail gracefully if ACPI is disabled
Date: Mon, 11 Feb 2008 20:41:42 -0800 (PST)	[thread overview]
Message-ID: <alpine.LFD.1.00.0802112038360.2920@woody.linux-foundation.org> (raw)
In-Reply-To: <200802111955.04562.carlos@strangeworlds.co.uk>



On Mon, 11 Feb 2008, Carlos Corbacho wrote:
> 
> WMI drivers, like their ACPI counterparts, should also check if ACPI is
> disabled or not, and bail out if so, otherwise we cause a crash.

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) {

  reply	other threads:[~2008-02-12  4:42 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-08  6:45 [GIT PATCH] ACPI patches for 2.6.25-rc0 (#2) Len Brown
2008-02-09  6:17 ` Ingo Molnar
2008-02-09  6:19   ` Ingo Molnar
2008-02-09 11:42     ` Carlos Corbacho
2008-02-11  9:17       ` Ingo Molnar
2008-02-11 19:23         ` Carlos Corbacho
2008-02-11 19:55           ` [PATCH 1/2] acer-wmi - Fail gracefully if ACPI is disabled Carlos Corbacho
2008-02-12  4:41             ` Linus Torvalds [this message]
2008-02-12 15:12               ` Ingo Molnar
2008-02-12 19:28               ` Carlos Corbacho
2008-02-11 19:55           ` [PATCH 2/2] tc1100-wmi " Carlos Corbacho
2008-02-14  6:11             ` Len Brown
2008-02-14  6:15               ` Len Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.LFD.1.00.0802112038360.2920@woody.linux-foundation.org \
    --to=torvalds@linux-foundation.org \
    --cc=akpm@linux-foundation.org \
    --cc=carlos@strangeworlds.co.uk \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@lists.linux-foundation.org \
    --cc=mingo@elte.hu \
    --subject='Re: [PATCH 1/2] acer-wmi - Fail gracefully if ACPI is disabled' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

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).