Skip to content

Commit

Permalink
ACPI: check acpi_disabled in acpi_table_parse() and acpi_table_parse_…
Browse files Browse the repository at this point in the history
…entries()

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>
  • Loading branch information
Len Brown committed Aug 28, 2009
1 parent f4a2d58 commit e5b8fc6
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions drivers/acpi/tables.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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;

Expand Down

0 comments on commit e5b8fc6

Please sign in to comment.