mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] staging: media: av7110: replace msleep(10) with usleep_range()
@ 2026-12-03  6:58 Andrii Hatsuk
  0 siblings, 0 replies; only message in thread
From: Andrii Hatsuk @ 2026-12-03  6:58 UTC (permalink / raw)
  To: gregkh, mchehab; +Cc: linux-staging, linux-media, linux-kernel, Andrii Hatsuk

msleep() for values under 20ms can sleep for up to 20ms.
Replace msleep(10) with usleep_range(10000, 11000) in the PLL lock
polling loop to ensure a more accurate delay, as suggested by
checkpatch.pl.

Signed-off-by: Andrii Hatsuk <andrii2014hatsuk@gmail.com>
---
 drivers/staging/media/av7110/av7110.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/media/av7110/av7110.c b/drivers/staging/media/av7110/av7110.c
index 432404ece..8679d5cd7 100644
--- a/drivers/staging/media/av7110/av7110.c
+++ b/drivers/staging/media/av7110/av7110.c
@@ -1818,7 +1818,7 @@ static int nexusca_stv0297_tuner_set_params(struct dvb_frontend *fe)
 		if (i2c_transfer(&av7110->i2c_adap, &readmsg, 1) == 1)
 			if (data[0] & 0x40)
 				break;
-		msleep(10);
+		usleep_range(10000, 11000);
 	}
 
 	return 0;
-- 
2.56.1


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

only message in thread, other threads:[~2026-12-03  6:58 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-12-03  6:58 [PATCH] staging: media: av7110: replace msleep(10) with usleep_range() Andrii Hatsuk

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®