[PATCH] staging: rtl8723bs: replace msleep(10) with usleep_range()

Yash Mehla posted 1 patch 1 month, 1 week ago
There is a newer version of this series
drivers/staging/rtl8723bs/core/rtw_cmd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[PATCH] staging: rtl8723bs: replace msleep(10) with usleep_range()
Posted by Yash Mehla 1 month, 1 week ago
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.

Signed-off-by: Yash Mehla <yashmehla688@gmail.com>
---
 drivers/staging/rtl8723bs/core/rtw_cmd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/rtl8723bs/core/rtw_cmd.c b/drivers/staging/rtl8723bs/core/rtw_cmd.c
index abb84f8ae..7818e8819 100644
--- a/drivers/staging/rtl8723bs/core/rtw_cmd.c
+++ b/drivers/staging/rtl8723bs/core/rtw_cmd.c
@@ -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);
-- 
2.53.0