pm: add lock for pm_auto_updatestate_cb()
@@ -42,9 +42,14 @@ static void pm_auto_updatestate_cb(FAR void *arg)
{
int domain = (uintptr_t)arg;
enum pm_state_e newstate;
+ irqstate_t flags;
+
+ flags = pm_lock(domain);
newstate = pm_checkstate(domain);
pm_changestate(domain, newstate);
+
+ pm_unlock(domain, flags);
}
/****************************************************************************
