runtime-pm: remove a superfluous k_is_pre_kernel() test
If runtime_suspend() is called early during Zephyr initialisation, while k_is_pre_kernel() returns 'true,' 'async' is set to 'false,' so if 'async' is 'true,' Zephyr initialisation is definitely complete, so there is no need to check k_is_pre_kernel() again. Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
This commit is contained in:
parent
ac71dfae90
commit
a1fd8cd078
1 changed files with 1 additions and 1 deletions
|
@ -76,7 +76,7 @@ static int runtime_suspend(const struct device *dev, bool async,
|
|||
goto unlock;
|
||||
}
|
||||
|
||||
if (async && !k_is_pre_kernel()) {
|
||||
if (async) {
|
||||
/* queue suspend */
|
||||
pm->state = PM_DEVICE_STATE_SUSPENDING;
|
||||
(void)k_work_schedule(&pm->work, delay);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue