public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] staging: media: atomisp: i2c: replace msleep() with usleep_range()
@ 2026-03-07  5:33 Mark Adamenko
  2026-03-10 13:34 ` Sakari Ailus
  0 siblings, 1 reply; 2+ messages in thread
From: Mark Adamenko @ 2026-03-07  5:33 UTC (permalink / raw)
  To: linux-media
  Cc: hansg, mchehab, gregkh, linux-kernel, linux-staging,
	Mark Adamenko

checkpatch.pl flags a warning for msleep() being called for 5
milliseconds. Replace the msleep() call with usleep_range(), as is already
done in the same function.

Signed-off-by: Mark Adamenko <marusik.adamenko@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.53.0


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

* Re: [PATCH] staging: media: atomisp: i2c: replace msleep() with usleep_range()
  2026-03-07  5:33 [PATCH] staging: media: atomisp: i2c: replace msleep() with usleep_range() Mark Adamenko
@ 2026-03-10 13:34 ` Sakari Ailus
  0 siblings, 0 replies; 2+ messages in thread
From: Sakari Ailus @ 2026-03-10 13:34 UTC (permalink / raw)
  To: Mark Adamenko
  Cc: linux-media, hansg, mchehab, gregkh, linux-kernel, linux-staging

Hi Mark,

This is a patch to the (atomisp-)gc2235 driver, not to atomisp itself.

On Fri, Mar 06, 2026 at 09:33:11PM -0800, Mark Adamenko wrote:
> checkpatch.pl flags a warning for msleep() being called for 5
> milliseconds. Replace the msleep() call with usleep_range(), as is already
> done in the same function.
> 
> Signed-off-by: Mark Adamenko <marusik.adamenko@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);

I'd use fsleep() here.

>  	return 0;
>  
>  fail_clk:

-- 
Regards,

Sakari Ailus

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

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

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-07  5:33 [PATCH] staging: media: atomisp: i2c: replace msleep() with usleep_range() Mark Adamenko
2026-03-10 13:34 ` Sakari Ailus

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