acpi: Convert part of acpi_table to use acpi_ctx
authorSimon Glass <sjg@chromium.org>
Sun, 26 Apr 2020 15:19:47 +0000 (09:19 -0600)
committerBin Meng <bmeng.cn@gmail.com>
Thu, 30 Apr 2020 09:16:12 +0000 (17:16 +0800)
commit86e1778ded011051774e20faaefe4b12a838b1a0
treecdf0e908e1f9d3e2ec50187b6f42271984176e8b
parent93f7f82782cb3d2bd55215ce984887efc6cddfed
acpi: Convert part of acpi_table to use acpi_ctx

The current code uses an address but a pointer would result in fewer
casts. Also it repeats the alignment code in a lot of places so this would
be better done in a helper function.

Update write_acpi_tables() to make use of the new acpi_ctx structure,
adding a few helpers to clean things up.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Wolfgang Wallner <wolfgang.wallner@br-automation.com>
arch/x86/lib/acpi_table.c
include/acpi/acpi_table.h
lib/acpi/acpi_table.c
test/dm/acpi.c