pm: remove unnecessary depends on OSINIT_OS_READY

Signed-off-by: ligd <liguiding1@xiaomi.com>
This commit is contained in:
ligd 2022-02-21 18:03:54 +08:00 committed by Petro Karashchenko
parent 84b88205ab
commit 8785673a70

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;