pm: remove unnecessary depends on OSINIT_OS_READY

Signed-off-by: ligd <liguiding1@xiaomi.com>
This commit is contained in:
ligd
2022-03-28 22:48:14 +08:00
committed by Xiang Xiao
parent 43d5f60a74
commit ed49aa1906
+3 -11
View File
@@ -62,19 +62,11 @@ int pm_register(FAR struct pm_callback_s *callbacks)
/* Add the new entry to the end of the list of registered callbacks */
if (OSINIT_OS_READY())
{
ret = pm_lock();
if (ret == OK)
{
dq_addlast(&callbacks->entry, &g_pmglobals.registry);
pm_unlock();
}
}
else
ret = pm_lock();
if (ret == OK)
{
dq_addlast(&callbacks->entry, &g_pmglobals.registry);
ret = OK;
pm_unlock();
}
return ret;