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/base.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/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, |