mirror of
https://github.com/apache/nuttx.git
synced 2026-06-06 00:14:22 +08:00
pm: remove unnecessary depends on OSINIT_OS_READY
Signed-off-by: ligd <liguiding1@xiaomi.com>
This commit is contained in:
@@ -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 */
|
/* Add the new entry to the end of the list of registered callbacks */
|
||||||
|
|
||||||
if (OSINIT_OS_READY())
|
ret = pm_lock();
|
||||||
{
|
if (ret == OK)
|
||||||
ret = pm_lock();
|
|
||||||
if (ret == OK)
|
|
||||||
{
|
|
||||||
dq_addlast(&callbacks->entry, &g_pmglobals.registry);
|
|
||||||
pm_unlock();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
dq_addlast(&callbacks->entry, &g_pmglobals.registry);
|
dq_addlast(&callbacks->entry, &g_pmglobals.registry);
|
||||||
ret = OK;
|
pm_unlock();
|
||||||
}
|
}
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
|
|||||||
Reference in New Issue
Block a user