* [PATCH] staging: rtl8723bs: replace msleep(10) with usleep_range()
@ 2026-03-03 7:41 Yash Mehla
0 siblings, 0 replies; only message in thread
From: Yash Mehla @ 2026-03-03 7:41 UTC (permalink / raw)
To: gregkh; +Cc: linux-staging, linux-kernel, Yash Mehla
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2026-03-03 7:43 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-03-03 7:41 [PATCH] staging: rtl8723bs: replace msleep(10) with usleep_range() Yash Mehla
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®