ACPI: acpi_madt_entry_handler() is not MADT specific
[sfrench/cifs-2.6.git] / drivers / acpi / tables.c
index ba4cb200314a12f50b66527140e7abada696fe91..f211fa35374c5a9f6f4b5f0ff0eed92302012ba8 100644 (file)
@@ -173,7 +173,7 @@ int __init
 acpi_table_parse_madt_family(char *id,
                             unsigned long madt_size,
                             int entry_id,
-                            acpi_madt_entry_handler handler,
+                            acpi_table_entry_handler handler,
                             unsigned int max_entries)
 {
        struct acpi_table_header *madt = NULL;
@@ -219,13 +219,22 @@ acpi_table_parse_madt_family(char *id,
 
 int __init
 acpi_table_parse_madt(enum acpi_madt_type id,
-                     acpi_madt_entry_handler handler, unsigned int max_entries)
+                     acpi_table_entry_handler handler, unsigned int max_entries)
 {
        return acpi_table_parse_madt_family(ACPI_SIG_MADT,
                                            sizeof(struct acpi_table_madt), id,
                                            handler, max_entries);
 }
 
+/**
+ * acpi_table_parse - find table with @id, run @handler on it
+ *
+ * @id: table id to find
+ * @handler: handler to run
+ *
+ * Scan the ACPI System Descriptor Table (STD) for a table matching @id,
+ * run @handler on it.  Return 0 if table found, return on if not.
+ */
 int __init acpi_table_parse(char *id, acpi_table_handler handler)
 {
        struct acpi_table_header *table = NULL;
@@ -235,9 +244,9 @@ int __init acpi_table_parse(char *id, acpi_table_handler handler)
        acpi_get_table(id, 0, &table);
        if (table) {
                handler(table);
-               return 1;
-       } else
                return 0;
+       } else
+               return 1;
 }
 
 /*