summaryrefslogtreecommitdiff
path: root/arch/x86/cpu/tangier/acpi.c
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2023-09-01 11:27:10 -0600
committerBin Meng <bmeng@tinylab.org>2023-09-22 06:03:46 +0800
commitb95bc64b06a1ec1786d9c82d3041c63ca1b4e147 (patch)
tree75dec7434f83278c19127f53992e902d471b1488 /arch/x86/cpu/tangier/acpi.c
parent2e977b2ce8f63aee6a5197eeb2330da093af44a1 (diff)
x86: Prevent from missing the FADT chaining
Recent approach with FADT writer shows that there is a room for subtle errors. Prevent this from happening again by introducing acpi_add_fadt() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Diffstat (limited to 'arch/x86/cpu/tangier/acpi.c')
-rw-r--r--arch/x86/cpu/tangier/acpi.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/arch/x86/cpu/tangier/acpi.c b/arch/x86/cpu/tangier/acpi.c
index ffaa56ab6f8..1c667c7d569 100644
--- a/arch/x86/cpu/tangier/acpi.c
+++ b/arch/x86/cpu/tangier/acpi.c
@@ -52,11 +52,7 @@ static int tangier_write_fadt(struct acpi_ctx *ctx,
header->checksum = table_compute_checksum(fadt, header->length);
- acpi_add_table(ctx, fadt);
-
- acpi_inc(ctx, sizeof(struct acpi_fadt));
-
- return 0;
+ return acpi_add_fadt(ctx, fadt);
}
ACPI_WRITER(5fadt, "FADT", tangier_write_fadt, 0);