staging: rtl8723bs: replace msleep with usleep_range in rtw_suspend_common
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
@@ -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
Quoted 3 lines · Gustavo Arantes
Replace msleep(1) with
usleep_range(1000, 2000)inrtw_suspend_common(), sincemsleep()for values less than 20ms may not sleep for the intended duration as documented inDocumentation/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]/
Quoted 2 lines · Bryant Boatright
This has been addressed in a thread recently and Gred said to drop the patch [1].
[1] https://lore.kernel.org/linux-staging/[email protected]/
Thanks for pointing that out. I'll drop both usleep_range patches.
Best regards,
Gustavo.