staging: atomisp: replace msleep with usleep_range in atomisp-gc2235.c
Subsystems (4)
PATCH 1/1 staging: atomisp: replace msleep with usleep_range in atomisp-gc2235.c
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.
--- drivers/staging/media/atomisp/i2c/atomisp-gc2235.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/media/atomisp/i2c/atomisp-gc2235.c +1 -1
@@ -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:
Signature · 1 line
2.43.0
Quoted 3 lines · 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.
Use () in Subject, use fsleep() in the code.
Signature · 2 lines
With Best Regards, Andy Shevchenko
PATCH v2 1/1 staging: media: atomisp: replace msleep() with fsleep() in atomisp-gc2235.c
In reply to Oskar Ray-FrayssinetReplace msleep(5) with fsleep(5000) to avoid sleeping longer than necessary. msleep() with values less than 20ms may sleep for up to 20ms due to timer granularity. fsleep() selects the appropriate sleep function automatically.
--- drivers/staging/media/atomisp/i2c/atomisp-gc2235.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/media/atomisp/i2c/atomisp-gc2235.c +1 -1
@@ -433,7 +433,7 @@ static int power_up(struct v4l2_subdev *sd) goto fail_power; } -msleep (5 ); +fsleep (5000 );return 0 ; fail_clk:
Signature · 1 line
2.43.0