aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/tables.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/acpi/tables.c')
-rw-r--r--drivers/acpi/tables.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/drivers/acpi/tables.c b/drivers/acpi/tables.c
index 61203eebf3a1..48eabb6c2d4f 100644
--- a/drivers/acpi/tables.c
+++ b/drivers/acpi/tables.c
@@ -712,6 +712,11 @@ acpi_os_physical_table_override(struct acpi_table_header *existing_table,
712 table_length); 712 table_length);
713} 713}
714 714
715#ifdef CONFIG_ACPI_CUSTOM_DSDT
716static void *amlcode __attribute__ ((weakref("AmlCode")));
717static void *dsdt_amlcode __attribute__ ((weakref("dsdt_aml_code")));
718#endif
719
715acpi_status 720acpi_status
716acpi_os_table_override(struct acpi_table_header *existing_table, 721acpi_os_table_override(struct acpi_table_header *existing_table,
717 struct acpi_table_header **new_table) 722 struct acpi_table_header **new_table)
@@ -722,8 +727,11 @@ acpi_os_table_override(struct acpi_table_header *existing_table,
722 *new_table = NULL; 727 *new_table = NULL;
723 728
724#ifdef CONFIG_ACPI_CUSTOM_DSDT 729#ifdef CONFIG_ACPI_CUSTOM_DSDT
725 if (strncmp(existing_table->signature, "DSDT", 4) == 0) 730 if (!strncmp(existing_table->signature, "DSDT", 4)) {
726 *new_table = (struct acpi_table_header *)AmlCode; 731 *new_table = (struct acpi_table_header *)&amlcode;
732 if (!(*new_table))
733 *new_table = (struct acpi_table_header *)&dsdt_amlcode;
734 }
727#endif 735#endif
728 if (*new_table != NULL) 736 if (*new_table != NULL)
729 acpi_table_taint(existing_table); 737 acpi_table_taint(existing_table);