summaryrefslogtreecommitdiff
path: root/include/acpi
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2020-09-22 21:45:39 +0300
committerBin Meng <bmeng.cn@gmail.com>2020-09-25 06:27:25 +0300
commit2a2ebf880cae6d961b8259b7b767d0aa0d34f070 (patch)
treed68c7c84e0df98ecde028410773a221a70748bcf /include/acpi
parentcc5e02fcbf41279fca8f701e78424db339420116 (diff)
downloadu-boot-2a2ebf880cae6d961b8259b7b767d0aa0d34f070.tar.xz
acpi: Use defines for field lengths
A few fields have an open-coded length. Use the defines for this purpose instead. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Diffstat (limited to 'include/acpi')
-rw-r--r--include/acpi/acpi_table.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/include/acpi/acpi_table.h b/include/acpi/acpi_table.h
index 9fba6536f5..3a243bf19c 100644
--- a/include/acpi/acpi_table.h
+++ b/include/acpi/acpi_table.h
@@ -13,6 +13,7 @@
#ifndef __ACPI_TABLE_H__
#define __ACPI_TABLE_H__
+#include <dm/acpi.h>
#include <linux/bitops.h>
#define RSDP_SIG "RSD PTR " /* RSDP pointer signature */
@@ -48,7 +49,7 @@ struct acpi_rsdp {
/* Generic ACPI header, provided by (almost) all tables */
struct __packed acpi_table_header {
- char signature[4]; /* ACPI signature (4 ASCII characters) */
+ char signature[ACPI_NAME_LEN]; /* ACPI signature (4 ASCII chars) */
u32 length; /* Table length in bytes (incl. header) */
u8 revision; /* Table version (not ACPI version!) */
volatile u8 checksum; /* To make sum of entire table == 0 */
@@ -263,7 +264,7 @@ struct __packed acpi_fadt {
/* FACS (Firmware ACPI Control Structure) */
struct acpi_facs {
- char signature[4]; /* "FACS" */
+ char signature[ACPI_NAME_LEN]; /* "FACS" */
u32 length; /* Length in bytes (>= 64) */
u32 hardware_signature; /* Hardware signature */
u32 firmware_waking_vector; /* Firmware waking vector */