init: adjust the SYS_INIT dev field init to play nice with older compilers
Fix a build error with certain older Cadence XCC toolchains. These
are used e.g. for Intel Tiger Lake products for the audio DSP (thhe oldest
platform supported in Zephyr upstream for the audio DSP).
To keep all compilers happy, use C89 style initializers.
Error:
lib/os/p4wq.c:216: error: unknown field ‘dev’ specified in initializer
lib/os/p4wq.c:216: warning: missing braces around initializer
lib/os/p4wq.c:216: warning: (near initialization for
‘__init_static_init.<anonymous>’)
Compiler version XCC RG-2017.8-linux (xt-xcc version 12.0.8)
Fixes: 2438dbb613 ("init: add missing initialization of dev pointer
in SYS_INIT macro")
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
This commit is contained in:
parent
9194a93d87
commit
19a33c7884
1 changed files with 1 additions and 1 deletions
|
|
@ -205,7 +205,7 @@ struct init_entry {
|
|||
#define SYS_INIT_NAMED(name, init_fn_, level, prio) \
|
||||
static const Z_DECL_ALIGN(struct init_entry) \
|
||||
Z_INIT_ENTRY_SECTION(level, prio, 0) __used __noasan \
|
||||
Z_INIT_ENTRY_NAME(name) = {.init_fn = {.sys = (init_fn_)}, .dev = NULL}
|
||||
Z_INIT_ENTRY_NAME(name) = {{ (init_fn_) }, { NULL } }
|
||||
|
||||
/** @} */
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue