Skip to contentSkip to conversation

staging: rtl8723bs: replace msleep(10) with usleep_range()

PATCH Superseded Yash Mehla 1 participant 1 message Mar 3 Staging

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Yash Mehla

author
#0 lore raw

PATCH 1/1 staging: rtl8723bs: replace msleep(10) with usleep_range()

msleep() should not be used for delays shorter than 20 ms. Replace msleep(10) with usleep_range(10000, 20000) and include <linux/delay.h> for the declaration.

---
 drivers/staging/rtl8723bs/core/rtw_cmd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/rtl8723bs/core/rtw_cmd.c +1 -1
index abb84f8ae..7818e8819 100644
@@ -214,7 +214,7 @@ void _rtw_free_evt_priv(struct	evt_priv *pevtpriv)
 {
 	_cancel_workitem_sync(&pevtpriv->c2h_wk);
 	while (pevtpriv->c2h_wk_alive)
-		msleep(10);
+		usleep_range(10000, 20000);
 
 	while (!rtw_cbuf_empty(pevtpriv->c2h_queue)) {
 		void *c2h = rtw_cbuf_pop(pevtpriv->c2h_queue);
Signature · 1 line
2.53.0