pm: device_runtime: Get rid of atomic for state

Since we are using mutex to protect critical sections and mutexes are
reentrant, it is possible to get rid of atomic for the state because
we can lock the mutex in device_pm_callback.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
This commit is contained in:
Flavio Ceolin 2021-05-21 09:57:20 -07:00 committed by Anas Nashif
commit d325642892
3 changed files with 14 additions and 14 deletions

View file

@ -114,7 +114,7 @@ struct pm_device {
/** Device usage count */
uint32_t usage;
/** Device idle internal power state */
atomic_t state;
uint8_t state;
/** Work object for asynchronous calls */
struct k_work_delayable work;
/** Event conditional var to listen to the sync request events */