projects
/
platform
/
kernel
/
linux-rpi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e0853a4
)
media: ov772x: Replace msleep(1) with usleep_range
author
Jacopo Mondi
<jacopo+renesas@jmondi.org>
Fri, 2 Mar 2018 14:46:42 +0000
(09:46 -0500)
committer
Mauro Carvalho Chehab
<mchehab@s-opensource.com>
Tue, 6 Mar 2018 16:58:50 +0000
(11:58 -0500)
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>
drivers/media/i2c/ov772x.c
patch
|
blob
|
history
diff --git
a/drivers/media/i2c/ov772x.c
b/drivers/media/i2c/ov772x.c
index 093a8040cfd2bcaf361ef411585e3cbd57a0d1fa..7fdf54e57ce0fa9e79392ed01977fff166a7ce12 100644
(file)
--- 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);
}