acpi: simplify updating header checksum
Use acpi_update_checksum() for updating ACPI table header checksum.
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Reviewed-by: Matthias Brugger <mbrugger@suse.com>
diff --git a/lib/acpi/ssdt.c b/lib/acpi/ssdt.c
index df1d739..41e2d3c 100644
--- a/lib/acpi/ssdt.c
+++ b/lib/acpi/ssdt.c
@@ -35,7 +35,7 @@
/* (Re)calculate length and checksum */
ssdt->length = ctx->current - (void *)ssdt;
- ssdt->checksum = table_compute_checksum((void *)ssdt, ssdt->length);
+ acpi_update_checksum(ssdt);
log_debug("SSDT at %p, length %x\n", ssdt, ssdt->length);
/* Drop the table if it is empty */