aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/i2c
diff options
context:
space:
mode:
authorJacopo Mondi <jacopo+renesas@jmondi.org>2018-03-02 09:46:42 -0500
committerMauro Carvalho Chehab <mchehab@s-opensource.com>2018-03-06 11:58:50 -0500
commitd9c70bbd39a5b076e1eaa88d53530d0219f7630e (patch)
tree9ca5182a5aaef0bb20a9540b563969371638d4a2 /drivers/media/i2c
parentmedia: ov772x: Empty line before end-of-function return (diff)
downloadlinux-dev-d9c70bbd39a5b076e1eaa88d53530d0219f7630e.tar.xz
linux-dev-d9c70bbd39a5b076e1eaa88d53530d0219f7630e.zip
media: ov772x: Replace msleep(1) with usleep_range
msleep() can sleep up to 20ms. As suggested by Documentation/timers/timers_howto.txt replace it with usleep_range() with up to 5ms delay. Signed-off-by: Jacopo Mondi <jacopo+renesas@jmondi.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'drivers/media/i2c')
-rw-r--r--drivers/media/i2c/ov772x.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/i2c/ov772x.c b/drivers/media/i2c/ov772x.c
index 093a8040cfd2..7fdf54e57ce0 100644
--- a/drivers/media/i2c/ov772x.c
+++ b/drivers/media/i2c/ov772x.c
@@ -574,7 +574,7 @@ static int ov772x_reset(struct i2c_client *client)
if (ret < 0)
return ret;
- msleep(1);
+ usleep_range(1000, 5000);
return ov772x_mask_set(client, COM2, SOFT_SLEEP_MODE, SOFT_SLEEP_MODE);
}