pm: remove unnecessary depends on OSINIT_OS_READY
Signed-off-by: ligd <liguiding1@xiaomi.com>
This commit is contained in:
parent
43d5f60a74
commit
ed49aa1906
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user