diff options
| author | Len Brown <len.brown@intel.com> | 2009-07-07 23:22:58 -0400 | 
|---|---|---|
| committer | Len Brown <len.brown@intel.com> | 2009-08-28 19:57:28 -0400 | 
| commit | e5b8fc6ac158f65598f58dba2c0d52ba3b412f52 (patch) | |
| tree | 1e4271c6f9ad1ba2f638cf73612b5b3229844a86 | |
| parent | f4a2d5840e9f0e48d1a787b66e7346087a756029 (diff) | |
| download | talos-op-linux-e5b8fc6ac158f65598f58dba2c0d52ba3b412f52.tar.gz talos-op-linux-e5b8fc6ac158f65598f58dba2c0d52ba3b412f52.zip  | |
ACPI: check acpi_disabled in acpi_table_parse() and acpi_table_parse_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>
| -rw-r--r-- | 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 646d39c031ca..f336bca7c450 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;  | 

