summaryrefslogtreecommitdiffstats
path: root/drivers/media/i2c/ov9650.c
diff options
context:
space:
mode:
authorNicholas Mc Guire <hofrat@osadl.org>2017-01-16 14:58:33 +0100
committerMauro Carvalho Chehab <mchehab@s-opensource.com>2017-01-31 14:54:47 +0100
commit0df03379c541ec027c94b025f2ef259f243eeb58 (patch)
treec36b4be4b089f79ca66a31fc6ed1488bf7ad704d /drivers/media/i2c/ov9650.c
parent[media] v4l: mt9v032: Remove unneeded gpiod NULL check (diff)
downloadlinux-0df03379c541ec027c94b025f2ef259f243eeb58.tar.xz
linux-0df03379c541ec027c94b025f2ef259f243eeb58.zip
[media] ov9650: use msleep() for uncritical long delay
ulseep_range() uses hrtimers and provides no advantage over msleep() for larger delays. Fix up the 25ms delays here to use msleep() and reduce the load on the hrtimer subsystem. Link: http://lkml.org/lkml/2017/1/11/377 Reviwed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to '')
-rw-r--r--drivers/media/i2c/ov9650.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/media/i2c/ov9650.c b/drivers/media/i2c/ov9650.c
index 502c72238a4a..2de2fbb13b85 100644
--- a/drivers/media/i2c/ov9650.c
+++ b/drivers/media/i2c/ov9650.c
@@ -522,7 +522,7 @@ static void __ov965x_set_power(struct ov965x *ov965x, int on)
if (on) {
ov965x_gpio_set(ov965x->gpios[GPIO_PWDN], 0);
ov965x_gpio_set(ov965x->gpios[GPIO_RST], 0);
- usleep_range(25000, 26000);
+ msleep(25);
} else {
ov965x_gpio_set(ov965x->gpios[GPIO_RST], 1);
ov965x_gpio_set(ov965x->gpios[GPIO_PWDN], 1);
@@ -1438,7 +1438,7 @@ static int ov965x_detect_sensor(struct v4l2_subdev *sd)
mutex_lock(&ov965x->lock);
__ov965x_set_power(ov965x, 1);
- usleep_range(25000, 26000);
+ msleep(25);
/* Check sensor revision */
ret = ov965x_read(client, REG_PID, &pid);