diff options
author | Tom Rini <trini@konsulko.com> | 2025-04-08 15:23:06 -0600 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2025-04-08 16:23:27 -0600 |
commit | fba8bfdd0bf2db1edd0383ba89a0c6037a6fe807 (patch) | |
tree | e6389f796e17959417c99a9ca196d373ffec4c94 /lib/acpi/acpi.c | |
parent | a1dd42950dee5e0da8fb5e053d8506eaa4000bf4 (diff) | |
parent | fecc50b0517d362b4db173b08a769f7b975d8255 (diff) |
Merge patch series "acpi: simplify updating ACPI table header checksum"
Heinrich Schuchardt <heinrich.schuchardt@canonical.com> says:
Introduce a new function to update ACPI table headers.
This allows to simplify the existing code.
Link: https://lore.kernel.org/r/20250321232121.251800-1-heinrich.schuchardt@canonical.com
Diffstat (limited to 'lib/acpi/acpi.c')
-rw-r--r-- | lib/acpi/acpi.c | 7 |
1 files changed, 7 insertions, 0 deletions
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 <mapmem.h> +#include <tables_csum.h> #include <acpi/acpi_table.h> #include <asm/global_data.h> 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; |