From: Carlos Corbacho <carlos@strangeworlds.co.uk>
To: Ingo Molnar <mingo@elte.hu>
Cc: Len Brown <lenb@kernel.org>,
Linus Torvalds <torvalds@linux-foundation.org>,
Andrew Morton <akpm@linux-foundation.org>,
linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-pm@lists.linux-foundation.org
Subject: [PATCH 1/2] acer-wmi - Fail gracefully if ACPI is disabled
Date: Mon, 11 Feb 2008 19:55:03 +0000 [thread overview]
Message-ID: <200802111955.04562.carlos@strangeworlds.co.uk> (raw)
In-Reply-To: <200802111923.31736.carlos@strangeworlds.co.uk>
acer-wmi - Fail gracefully if ACPI is disabled
From: Carlos Corbacho <carlos@strangeworlds.co.uk>
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.
Spotted by Ingo Molnar.
Signed-off-by: Carlos Corbacho <carlos@strangeworlds.co.uk>
CC: Ingo Molnar <mingo@elte.hu>
CC: Linus Torvalds <torvalds@linux-foundation.org>
CC: Andrew Morton <akpm@linux-foundation.org>
CC: Len Brown <lenb@kernel.org>
---
drivers/misc/acer-wmi.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/drivers/misc/acer-wmi.c b/drivers/misc/acer-wmi.c
index d7aea93..6e81027 100644
--- a/drivers/misc/acer-wmi.c
+++ b/drivers/misc/acer-wmi.c
@@ -1029,6 +1029,9 @@ static int __init acer_wmi_init(void)
{
int err;
+ if (acpi_disabled)
+ return -ENODEV;
+
printk(ACER_INFO "Acer Laptop ACPI-WMI Extras version %s\n",
ACER_WMI_VERSION);
next prev parent reply other threads:[~2008-02-11 19:55 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 ` Carlos Corbacho [this message]
2008-02-12 4:41 ` [PATCH 1/2] acer-wmi - Fail gracefully if ACPI is disabled Linus Torvalds
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=200802111955.04562.carlos@strangeworlds.co.uk \
--to=carlos@strangeworlds.co.uk \
--cc=akpm@linux-foundation.org \
--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 \
--cc=torvalds@linux-foundation.org \
/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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox