public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] staging: atomisp: replace msleep with usleep_range in atomisp-gc2235.c
@ 2026-03-09 23:14 Oskar Ray-Frayssinet
  2026-03-10 11:43 ` Andy Shevchenko
  2026-03-10 15:03 ` [PATCH v2] staging: media: atomisp: replace msleep() with fsleep() " Oskar Ray-Frayssinet
  0 siblings, 2 replies; 3+ messages in thread
From: Oskar Ray-Frayssinet @ 2026-03-09 23:14 UTC (permalink / raw)
  To: hansg, mchehab
  Cc: sakari.ailus, andy, gregkh, linux-media, linux-staging,
	linux-kernel, Oskar Ray-Frayssinet

Replace msleep(5) with usleep_range(5000, 6000) to avoid sleeping
longer than necessary. msleep() with values less than 20ms may sleep
for up to 20ms due to timer granularity.

Signed-off-by: Oskar Ray-Frayssinet <rayfraytech@gmail.com>
---
 drivers/staging/media/atomisp/i2c/atomisp-gc2235.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/media/atomisp/i2c/atomisp-gc2235.c b/drivers/staging/media/atomisp/i2c/atomisp-gc2235.c
index d3414312e1de..db5e007efc56 100644
--- a/drivers/staging/media/atomisp/i2c/atomisp-gc2235.c
+++ b/drivers/staging/media/atomisp/i2c/atomisp-gc2235.c
@@ -433,7 +433,7 @@ static int power_up(struct v4l2_subdev *sd)
 			goto fail_power;
 	}
 
-	msleep(5);
+	usleep_range(5000, 6000);
 	return 0;
 
 fail_clk:
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-03-10 15:03 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-09 23:14 [PATCH] staging: atomisp: replace msleep with usleep_range in atomisp-gc2235.c Oskar Ray-Frayssinet
2026-03-10 11:43 ` Andy Shevchenko
2026-03-10 15:03 ` [PATCH v2] staging: media: atomisp: replace msleep() with fsleep() " Oskar Ray-Frayssinet

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