From: Amin Madani <aminmadani112@gmail.com>
To: gregkh@linuxfoundation.org
Cc: linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org,
Amin Madani <aminmadani112@gmail.com>
Subject: [PATCH] staging: rtl8723bs: Replace msleep with usleep_range in os_intfs.c
Date: Wed, 15 Jul 2026 20:17:13 +0330 [thread overview]
Message-ID: <20260715164713.91613-1-aminmadani112@gmail.com> (raw)
msleep() for values under 20ms is not precise enough and can sleep for
up to 20ms. Replace msleep(10) and msleep(1) with usleep_range() to
provide better precision and allow hrtimers to be used in os_intfs.c.
Signed-off-by: Amin Madani <aminmadani112@gmail.com>
---
drivers/staging/rtl8723bs/os_dep/os_intfs.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/rtl8723bs/os_dep/os_intfs.c b/drivers/staging/rtl8723bs/os_dep/os_intfs.c
index f31196f54..24b55a542 100644
--- a/drivers/staging/rtl8723bs/os_dep/os_intfs.c
+++ b/drivers/staging/rtl8723bs/os_dep/os_intfs.c
@@ -992,7 +992,7 @@ void rtw_dev_unload(struct adapter *padapter)
if (cnt > 5)
break;
cnt++;
- msleep(10);
+ usleep_range(10000, 15000);
}
/* check the status of IPS */
@@ -1092,7 +1092,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;
--
2.53.0
reply other threads:[~2026-07-15 16:47 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260715164713.91613-1-aminmadani112@gmail.com \
--to=aminmadani112@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox