From: Len Brown <lenb@kernel.org>
To: x86@kernel.org, sfi-devel@simplefirmware.org,
linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org
Cc: Len Brown <len.brown@intel.com>, Feng Tang <feng.tang@intel.com>
Subject: [PATCH 03/11] ACPI: check acpi_disabled in acpi_table_parse() and acpi_table_parse_entries()
Date: Fri, 14 Aug 2009 16:38:07 -0400 [thread overview]
Message-ID: <55ec50ee899aa3199c126bb4b740abb9a4ab51df.1250281826.git.len.brown@intel.com> (raw)
In-Reply-To: <1250282295-25216-1-git-send-email-lenb@kernel.org>
In-Reply-To: <0763223ab0ef5c0016b7a179c1acccaabbefea02.1250281826.git.len.brown@intel.com>
From: Len Brown <len.brown@intel.com>
Allow consumers of the acpi_table_parse()/acpi_table_parse_entries() API
to gracefully handle the acpi_disabled=1 case via return value
rather than checking the global flag themselves.
Signed-off-by: Feng Tang <feng.tang@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
---
drivers/acpi/tables.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/drivers/acpi/tables.c b/drivers/acpi/tables.c
index 646d39c..f336bca 100644
--- a/drivers/acpi/tables.c
+++ b/drivers/acpi/tables.c
@@ -213,6 +213,9 @@ acpi_table_parse_entries(char *id,
unsigned long table_end;
acpi_size tbl_size;
+ if (acpi_disabled)
+ return -ENODEV;
+
if (!handler)
return -EINVAL;
@@ -277,6 +280,9 @@ int __init acpi_table_parse(char *id, acpi_table_handler handler)
struct acpi_table_header *table = NULL;
acpi_size tbl_size;
+ if (acpi_disabled)
+ return -ENODEV;
+
if (!handler)
return -EINVAL;
--
1.6.0.6
next prev parent reply other threads:[~2009-08-14 20:41 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-14 20:38 [PATCH 00/11] SFI: Simple Firmware Interface - v3 Len Brown
2009-08-14 20:38 ` [PATCH 01/11] ACPI: Move definition of PREFIX from acpi_bus.h to internal..h Len Brown
2009-08-14 20:38 ` [PATCH 02/11] ACPI, PCI: Change PREFIX to "PCI" from "ACPI" in mmconfig-shared.c Len Brown
2009-08-14 20:38 ` Len Brown [this message]
2009-08-14 20:38 ` [PATCH 04/11] ACPI: Handle CONFIG_ACPI=n better from linux/acpi.h Len Brown
2009-08-14 20:38 ` [PATCH 05/11] ACPI, x86: expose some IO-APIC routines when CONFIG_ACPI=n Len Brown
2009-08-14 20:38 ` [PATCH 06/11] SFI: Simple Firmware Interface - MAINTAINERS, Kconfig Len Brown
2009-08-14 20:38 ` [PATCH 07/11] SFI: create linux/sfi.h Len Brown
2009-08-14 20:38 ` [PATCH 08/11] SFI: add platform-independent core support Len Brown
2009-08-14 20:38 ` [PATCH 09/11] SFI: add capability to parse ACPI tables Len Brown
2009-08-14 20:38 ` [PATCH 10/11] x86: add arch-specific SFI support Len Brown
2009-08-14 20:38 ` [PATCH 11/11] SFI: Hook PCI MMCONFIG Len Brown
2009-08-17 10:06 ` [PATCH 00/11] SFI: Simple Firmware Interface - v3 Ingo Molnar
2009-08-29 0:14 ` Len Brown
2009-08-29 7:34 ` Ingo Molnar
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=55ec50ee899aa3199c126bb4b740abb9a4ab51df.1250281826.git.len.brown@intel.com \
--to=lenb@kernel.org \
--cc=feng.tang@intel.com \
--cc=len.brown@intel.com \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=sfi-devel@simplefirmware.org \
--cc=x86@kernel.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
all inboxes | Powered by JetHome®