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:
parent
69a34e5947
commit
d325642892
3 changed files with 14 additions and 14 deletions
|
@ -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 */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue