The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [PATCH] staging: rtl8723bs: use usleep_range() instead of msleep()
@ 2026-08-22 20:54 Luka Miletic
  0 siblings, 0 replies; only message in thread
From: Luka Miletic @ 2026-08-22 20:54 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Luka Miletic, Dang Vu Duc Hien, open list:STAGING SUBSYSTEM,
	open list

Use usleep_range() instead of msleep() to fix checkpatch warnings.
Verified both loops exit on their own condition, independent of
sleep duration, so this only changes timing precision, not behavior.

Signed-off-by: Luka Miletic <mileticluka2001@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 c15056ee2..8b793680f 100644
--- a/drivers/staging/rtl8723bs/os_dep/os_intfs.c
+++ b/drivers/staging/rtl8723bs/os_dep/os_intfs.c
@@ -986,7 +986,7 @@ void rtw_dev_unload(struct adapter *padapter)
 			if (cnt > 5)
 				break;
 			cnt++;
-			msleep(10);
+			usleep_range(10000, 20000);
 		}
 
 		/* check the status of IPS */
@@ -1086,7 +1086,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->driver_stopped) || (padapter->bSurpriseRemoved))
 		return;
-- 
2.34.1


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-08-22 20:54 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-22 20:54 [PATCH] staging: rtl8723bs: use usleep_range() instead of msleep() Luka Miletic

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox