From ae26b38870b5e64d26baed17c4b0fee74698bdb4 Mon Sep 17 00:00:00 2001 From: Gerard Marull-Paretas Date: Thu, 26 Aug 2021 16:57:06 +0200 Subject: [PATCH] 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 --- include/device.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/device.h b/include/device.h index 05dcc7fa5c2..69465790442 100644 --- a/include/device.h +++ b/include/device.h @@ -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( \