pm: Do not suspend during kernel initialization
Check if the kernel has fully initialized before take any action that may suspend the system. Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
This commit is contained in:
parent
669c4d1738
commit
bb5d644158
1 changed files with 1 additions and 1 deletions
|
|
@ -79,7 +79,7 @@ void idle(void *unused1, void *unused2, void *unused3)
|
|||
* which is essential for the kernel's scheduling
|
||||
* logic.
|
||||
*/
|
||||
if (pm_system_suspend(_kernel.idle) == false) {
|
||||
if (k_is_pre_kernel() || !pm_system_suspend(_kernel.idle)) {
|
||||
k_cpu_idle();
|
||||
}
|
||||
#else
|
||||
|
|
|
|||
Loading…
Reference in a new issue