diff options
author | Len Brown <len.brown@intel.com> | 2007-02-10 21:28:03 -0500 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2007-02-13 02:58:52 -0500 |
commit | 7f8f97c3cc75d5783d0b45cf323dedf17684be19 (patch) | |
tree | 347a8b2e06904598fea849c533a866727addaf5e /drivers/acpi/tables.c | |
parent | 7cda93e008e1a477970adbf82dba81a5d4f0ae40 (diff) |
ACPI: acpi_table_parse() now returns success/fail, not count
Returning count for tables that are supposed to be unique
was useless and confusing.
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi/tables.c')
-rw-r--r-- | drivers/acpi/tables.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/drivers/acpi/tables.c b/drivers/acpi/tables.c index ba4cb200314a..2075ec7b827b 100644 --- a/drivers/acpi/tables.c +++ b/drivers/acpi/tables.c | |||
@@ -226,6 +226,15 @@ acpi_table_parse_madt(enum acpi_madt_type id, | |||
226 | handler, max_entries); | 226 | handler, max_entries); |
227 | } | 227 | } |
228 | 228 | ||
229 | /** | ||
230 | * acpi_table_parse - find table with @id, run @handler on it | ||
231 | * | ||
232 | * @id: table id to find | ||
233 | * @handler: handler to run | ||
234 | * | ||
235 | * Scan the ACPI System Descriptor Table (STD) for a table matching @id, | ||
236 | * run @handler on it. Return 0 if table found, return on if not. | ||
237 | */ | ||
229 | int __init acpi_table_parse(char *id, acpi_table_handler handler) | 238 | int __init acpi_table_parse(char *id, acpi_table_handler handler) |
230 | { | 239 | { |
231 | struct acpi_table_header *table = NULL; | 240 | struct acpi_table_header *table = NULL; |
@@ -235,9 +244,9 @@ int __init acpi_table_parse(char *id, acpi_table_handler handler) | |||
235 | acpi_get_table(id, 0, &table); | 244 | acpi_get_table(id, 0, &table); |
236 | if (table) { | 245 | if (table) { |
237 | handler(table); | 246 | handler(table); |
238 | return 1; | ||
239 | } else | ||
240 | return 0; | 247 | return 0; |
248 | } else | ||
249 | return 1; | ||
241 | } | 250 | } |
242 | 251 | ||
243 | /* | 252 | /* |