Skip to content

Commit 2e9589b

Browse files
Flavio Ceolinnashif
authored andcommitted
pm: Just check the forced flag
When suspending we don't need to set the forced flag but just check if it is set. Signed-off-by: Flavio Ceolin <[email protected]>
1 parent fdf7465 commit 2e9589b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

subsys/pm/pm.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ bool pm_system_suspend(int32_t ticks)
203203

204204
SYS_PORT_TRACING_FUNC_ENTER(pm, system_suspend, ticks);
205205

206-
if (!atomic_test_and_set_bit(z_cpus_pm_state_forced, id)) {
206+
if (!atomic_test_bit(z_cpus_pm_state_forced, id)) {
207207
const struct pm_state_info *info;
208208

209209
info = pm_policy_next_state(id, ticks);

0 commit comments

Comments
 (0)