From: Martin Kaiser Date: Wed, 13 Apr 2022 19:36:47 +0000 (+0200) Subject: staging: r8188eu: simplify delay conditions in rtw_pwr_wakeup X-Git-Tag: v6.1-rc5~1163^2~153 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c5c3e3464ec36c6d91bf39a647b07e3ed9d4fe81;p=platform%2Fkernel%2Flinux-starfive.git staging: r8188eu: simplify delay conditions in rtw_pwr_wakeup Simplify the conditions for a loop in rtw_pwr_wakeup that waits while the system is suspended. Signed-off-by: Martin Kaiser Link: https://lore.kernel.org/r/20220413193654.258507-2-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/r8188eu/core/rtw_pwrctrl.c b/drivers/staging/r8188eu/core/rtw_pwrctrl.c index 8c2e983..8150894 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)) {