Simplify the conditions for a loop in rtw_pwr_wakeup that waits while the system is suspended. Signed-off-by: Martin Kaiser <martin@xxxxxxxxx> --- drivers/staging/r8188eu/core/rtw_pwrctrl.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/staging/r8188eu/core/rtw_pwrctrl.c b/drivers/staging/r8188eu/core/rtw_pwrctrl.c index 8c2e98361e47..8150894fba82 100644 --- a/drivers/staging/r8188eu/core/rtw_pwrctrl.c +++ b/drivers/staging/r8188eu/core/rtw_pwrctrl.c @@ -388,12 +388,8 @@ int rtw_pwr_wakeup(struct adapter *padapter) } /* System suspend is not allowed to wakeup */ - if (pwrpriv->bInSuspend) { - while (pwrpriv->bInSuspend && - (rtw_get_passing_time_ms(start) <= 3000 || - (rtw_get_passing_time_ms(start) <= 500))) - msleep(10); - } + while (pwrpriv->bInSuspend && rtw_get_passing_time_ms(start) <= 3000) + msleep(10); /* I think this should be check in IPS, LPS, autosuspend functions... */ if (check_fwstate(pmlmepriv, _FW_LINKED)) { -- 2.30.2