From 69e61d46d2dcdcf84a3a7aed7cf74ac3b3b850fd Mon Sep 17 00:00:00 2001 From: Heinrich Schuchardt Date: Sat, 22 Mar 2025 00:21:16 +0100 Subject: acpi: new function acpi_update_checksum() Introduce a new function to update ACPI table headers. This allows to simplify the existing code. Signed-off-by: Heinrich Schuchardt Reviewed-by: Matthias Brugger Reviewed-by: Ilias Apalodimas --- lib/acpi/acpi.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'lib') diff --git a/lib/acpi/acpi.c b/lib/acpi/acpi.c index f4d5c1e25d0..596301a43fe 100644 --- a/lib/acpi/acpi.c +++ b/lib/acpi/acpi.c @@ -6,11 +6,18 @@ */ #include +#include #include #include DECLARE_GLOBAL_DATA_PTR; +void acpi_update_checksum(struct acpi_table_header *header) +{ + header->checksum = 0; + header->checksum = table_compute_checksum(header, header->length); +} + struct acpi_table_header *acpi_find_table(const char *sig) { struct acpi_rsdp *rsdp; -- cgit v1.2.3