Re: [PATCH] staging: media: atomisp: i2c: replace msleep() with usleep_range()
From: Sakari Ailus
Date: Tue Mar 10 2026 - 10:10:27 EST
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@xxxxxxxxx>
> ---
> 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