diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2013-11-03 20:28:24 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2013-12-03 17:50:28 -0200 |
commit | ca6f19b1cf0fac0fdf1ef06d6bed0f07f8f37ae9 (patch) | |
tree | 2f4672970291b3f700e625335b0d612437af8282 /drivers/staging/media/omap4iss/iss.c | |
parent | 57da5e47ccf3d727958aeef7675154d48635fa09 (diff) | |
download | op-kernel-dev-ca6f19b1cf0fac0fdf1ef06d6bed0f07f8f37ae9.zip op-kernel-dev-ca6f19b1cf0fac0fdf1ef06d6bed0f07f8f37ae9.tar.gz |
[media] v4l: omap4iss: Replace udelay/msleep with usleep_range
The only udelay() call takes place in a sleepable context, we can sleep
instead. Use usleep_range().
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/staging/media/omap4iss/iss.c')
-rw-r--r-- | drivers/staging/media/omap4iss/iss.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/staging/media/omap4iss/iss.c b/drivers/staging/media/omap4iss/iss.c index 320bfd4..3103093 100644 --- a/drivers/staging/media/omap4iss/iss.c +++ b/drivers/staging/media/omap4iss/iss.c @@ -642,11 +642,11 @@ static int iss_reset(struct iss_device *iss) while (readl(iss->regs[OMAP4_ISS_MEM_TOP] + ISS_HL_SYSCONFIG) & ISS_HL_SYSCONFIG_SOFTRESET) { - if (timeout++ > 10000) { + if (timeout++ > 100) { dev_alert(iss->dev, "cannot reset ISS\n"); return -ETIMEDOUT; } - udelay(1); + usleep_range(10, 10); } return 0; @@ -674,7 +674,7 @@ static int iss_isp_reset(struct iss_device *iss) dev_alert(iss->dev, "cannot set ISP5 to standby\n"); return -ETIMEDOUT; } - msleep(1); + usleep_range(1000, 1500); } /* Now finally, do the reset */ @@ -689,7 +689,7 @@ static int iss_isp_reset(struct iss_device *iss) dev_alert(iss->dev, "cannot reset ISP5\n"); return -ETIMEDOUT; } - msleep(1); + usleep_range(1000, 1500); } return 0; |