staging: rtl8723bs: replace msleep(10) with usleep_range()
PATCH v2 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 add <linux/delay.h> for the declaration.
Signed-off-by Yash Mehla <[email protected]>
--- drivers/staging/rtl8723bs/core/rtw_cmd.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/staging/rtl8723bs/core/rtw_cmd.c +2 -1
@@ -5,6 +5,7 @@* ******************************************************************************/ #include <drv_types.h> +#include <linux/delay.h> #include <hal_btcoex.h> #include <linux/jiffies.h> #include <linux/align.h>
@@ -214,7 +215,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
Quoted 6 lines · Yash Mehla
msleep()should not be used for delays shorter than 20 ms. Replace msleep(10) withusleep_range(10000, 20000)and add <linux/delay.h> for the declaration.Signed-off-by Yash Mehla <[email protected]>---
This has already came up before and Greg decided to drop it. [1]
Thanks,
ET
[1] https://lore.kernel.org/linux-staging/[email protected]/