/* 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)
/* 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;
	acpi_size tbl_size;
	if (acpi_disabled && !acpi_ht)
		return -ENODEV;
	if (!handler)
		return -EINVAL;
	if (strncmp(id, ACPI_SIG_MADT, 4) == 0)
		acpi_get_table_with_size(id, acpi_apic_instance, &table, &tbl_size);
	else
		acpi_get_table_with_size(id, 0, &table, &tbl_size);
	if (table) {
		handler(table);
		early_acpi_os_unmap_memory(table, tbl_size);
		return 0;
	} else
		return 1;
}