Skip to contentSkip to conversation

staging: rtl8723bs: replace msleep with usleep_range in rtw_suspend_common

PATCH In review Gustavo Arantes 2 participants 3 messages Mar 8 – Mar 9 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 staging: rtl8723bs: replace msleep with usleep_range in rtw_suspend_common

Replace msleep(1) with usleep_range(1000, 2000) in rtw_suspend_common(), since msleep() for values less than 20ms may not sleep for the intended duration as documented in Documentation/timers/timers-howto.rst.

---
 drivers/staging/rtl8723bs/os_dep/os_intfs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/rtl8723bs/os_dep/os_intfs.c +1 -1
index f2d64b05debb..47b1c791ec8c 100644
@@ -1091,7 +1091,7 @@ void rtw_suspend_common(struct adapter *padapter)
 	pwrpriv->bInSuspend = true;
 
 	while (pwrpriv->bips_processing)
-		msleep(1);
+		usleep_range(1000, 2000);
 
 	if ((!padapter->bup) || (padapter->bDriverStopped) || (padapter->bSurpriseRemoved))
 		return;
Signature · 1 line
2.53.0
#1 lore raw
Quoted 3 lines · Gustavo Arantes

Replace msleep(1) with usleep_range(1000, 2000) in rtw_suspend_common(), since msleep() for values less than 20ms may not sleep for the intended duration as documented in Documentation/timers/timers-howto.rst.

This has been addressed in a thread recently and Gred said to drop the patch [1].

Best,

Bryant Boatright

[1] https://lore.kernel.org/linux-staging/[email protected]/