[PATCH 10/12] ACPI: check acpi_disabled in acpi_table_parse()

Len Brown
2009-07-08T04:17:10Z

From: Len Brown <len.brown@intel.com>

Allow consumers of the acpi_table_parse() API
to gracefully handle the acpi_disabled=1 case
without checking the flag themselves.

Signed-off-by: Feng Tang <feng.tang@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
---
drivers/acpi/tables.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/drivers/acpi/tables.c b/drivers/acpi/tables.c
index 646d39c..921746f 100644
--- a/drivers/acpi/tables.c
+++ b/drivers/acpi/tables.c
@@ -277,6 +277,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 1;
+
if (!handler)
return -EINVAL;

--
1.6.0.6