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 <flavio.ceolin@intel.com>
This commit is contained in:
Flavio Ceolin 2022-01-28 11:37:30 -08:00 committed by Anas Nashif
parent fdf7465851
commit 2e9589bd44

View file

@ -203,7 +203,7 @@ bool pm_system_suspend(int32_t ticks)
SYS_PORT_TRACING_FUNC_ENTER(pm, system_suspend, ticks);
if (!atomic_test_and_set_bit(z_cpus_pm_state_forced, id)) {
if (!atomic_test_bit(z_cpus_pm_state_forced, id)) {
const struct pm_state_info *info;
info = pm_policy_next_state(id, ticks);