diff options
author | Kees Cook <keescook@google.com> | 2017-07-10 09:23:08 +0200 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2017-07-20 16:38:24 +0200 |
commit | 99e597adf60e1a6f83ec746db8cab225b16a838b (patch) | |
tree | 1ac6f71f9366debbc4a2db92efbfb871f8faa5ea /include/acpi | |
parent | ACPICA: iASL compiler: allow compilation of externals with paths that refer t... (diff) | |
download | linux-99e597adf60e1a6f83ec746db8cab225b16a838b.tar.xz linux-99e597adf60e1a6f83ec746db8cab225b16a838b.zip |
Back port of "ACPICA: Use designated initializers"
ACPICA commit 47538f5f0773c0820d8f552e20f6e77104290c01
The following commit is not correctly linuxized by its ACPICA form (see
link #1 for reference):
Commit: 3d867f6c5fd6535cdeceef3170e5e84e5dd80fc1
Subject: ACPICA: Use designated initializers
Thus breaks linuxize process.
This patch is a linuxized back port result of the upstreamed ACPICA
commit (see link #2 for reference).
Link: https://github.com/acpica/acpica/pull/248/ [#1]
Link: https://github.com/acpica/acpica/commit/47538f5f [#2]
Signed-off-by: Kees Cook <keescook@google.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'include/acpi')
-rw-r--r-- | include/acpi/platform/acenv.h | 9 | ||||
-rw-r--r-- | include/acpi/platform/aclinux.h | 3 |
2 files changed, 8 insertions, 4 deletions
diff --git a/include/acpi/platform/acenv.h b/include/acpi/platform/acenv.h index 912563c66948..043fd559de6e 100644 --- a/include/acpi/platform/acenv.h +++ b/include/acpi/platform/acenv.h @@ -288,6 +288,11 @@ #define ACPI_INLINE #endif +/* Use ordered initialization if compiler doesn't support designated. */ +#ifndef ACPI_STRUCT_INIT +#define ACPI_STRUCT_INIT(field, value) value +#endif + /* * Configurable calling conventions: * @@ -382,8 +387,4 @@ #define ACPI_INIT_FUNCTION #endif -#ifndef ACPI_STRUCT_INIT -#define ACPI_STRUCT_INIT(field, value) value -#endif - #endif /* __ACENV_H__ */ diff --git a/include/acpi/platform/aclinux.h b/include/acpi/platform/aclinux.h index 047f13865608..afd95f28c8f0 100644 --- a/include/acpi/platform/aclinux.h +++ b/include/acpi/platform/aclinux.h @@ -178,6 +178,9 @@ #define ACPI_MSG_BIOS_ERROR KERN_ERR "ACPI BIOS Error (bug): " #define ACPI_MSG_BIOS_WARNING KERN_WARNING "ACPI BIOS Warning (bug): " +/* + * Linux wants to use designated initializers for function pointer structs. + */ #define ACPI_STRUCT_INIT(field, value) .field = value #else /* !__KERNEL__ */ |