LOG_BACKEND_DEFINE(): use Z_STRUCT_SECTION_ITERABLE()

Replace the open coded section attribute by Z_STRUCT_SECTION_ITERABLE()
to properly align structure instances on 64-bit targets.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
This commit is contained in:
Nicolas Pitre 2019-08-04 22:33:05 -04:00 committed by Carles Cufí
commit cd4e7893ea
2 changed files with 2 additions and 3 deletions

View file

@ -78,8 +78,7 @@ extern const struct log_backend __log_backends_end[0];
.active = false, \
.id = 0, \
}; \
static const struct log_backend _name \
__attribute__ ((section(".log_backends"))) __attribute__((used)) = \
static const Z_STRUCT_SECTION_ITERABLE(log_backend, _name) = \
{ \
.api = &_api, \
.cb = &UTIL_CAT(backend_cb_, _name), \