pm: fix usage initialization

The usage field was being initialized using the ATOMIC_INIT macro,
however, it is just a uint32_t variable.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
This commit is contained in:
Gerard Marull-Paretas 2021-08-26 16:57:06 +02:00 committed by Anas Nashif
commit ae26b38870

View file

@ -839,7 +839,7 @@ BUILD_ASSERT(sizeof(device_handle_t) == 2, "fix the linker scripts");
static struct device_state Z_DEVICE_STATE_NAME(dev_name) \
__attribute__((__section__(".z_devstate"))) = { \
.pm = { \
.usage = ATOMIC_INIT(0), \
.usage = 0U, \
.lock = Z_MUTEX_INITIALIZER( \
Z_DEVICE_STATE_NAME(dev_name).pm.lock), \
.condvar = Z_CONDVAR_INITIALIZER( \