diff options
author | Heinrich Schuchardt <heinrich.schuchardt@canonical.com> | 2025-03-22 00:21:17 +0100 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2025-04-08 15:22:56 -0600 |
commit | bbc78592b16d164fbb252455d6a60afb3ee52709 (patch) | |
tree | 49f59985dc2da06e2573f2f755b03f26a1c95777 /lib/acpi/base.c | |
parent | 69e61d46d2dcdcf84a3a7aed7cf74ac3b3b850fd (diff) |
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>
Diffstat (limited to 'lib/acpi/base.c')
-rw-r--r-- | lib/acpi/base.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/acpi/base.c b/lib/acpi/base.c index 8b6af2bc43a..5c755b14c16 100644 --- a/lib/acpi/base.c +++ b/lib/acpi/base.c @@ -50,8 +50,7 @@ static void acpi_write_rsdt(struct acpi_rsdt *rsdt) /* Entries are filled in later, we come with an empty set */ /* Fix checksum */ - header->checksum = table_compute_checksum(rsdt, - sizeof(struct acpi_rsdt)); + acpi_update_checksum(header); } static void acpi_write_xsdt(struct acpi_xsdt *xsdt) @@ -66,8 +65,7 @@ static void acpi_write_xsdt(struct acpi_xsdt *xsdt) /* Entries are filled in later, we come with an empty set */ /* Fix checksum */ - header->checksum = table_compute_checksum(xsdt, - sizeof(struct acpi_xsdt)); + acpi_update_checksum(header); } static int acpi_write_base(struct acpi_ctx *ctx, |