Commit ca6f19b1 authored by Laurent Pinchart's avatar Laurent Pinchart Committed by Mauro Carvalho Chehab

[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: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 57da5e47
...@@ -642,11 +642,11 @@ static int iss_reset(struct iss_device *iss) ...@@ -642,11 +642,11 @@ static int iss_reset(struct iss_device *iss)
while (readl(iss->regs[OMAP4_ISS_MEM_TOP] + ISS_HL_SYSCONFIG) & while (readl(iss->regs[OMAP4_ISS_MEM_TOP] + ISS_HL_SYSCONFIG) &
ISS_HL_SYSCONFIG_SOFTRESET) { ISS_HL_SYSCONFIG_SOFTRESET) {
if (timeout++ > 10000) { if (timeout++ > 100) {
dev_alert(iss->dev, "cannot reset ISS\n"); dev_alert(iss->dev, "cannot reset ISS\n");
return -ETIMEDOUT; return -ETIMEDOUT;
} }
udelay(1); usleep_range(10, 10);
} }
return 0; return 0;
...@@ -674,7 +674,7 @@ static int iss_isp_reset(struct iss_device *iss) ...@@ -674,7 +674,7 @@ static int iss_isp_reset(struct iss_device *iss)
dev_alert(iss->dev, "cannot set ISP5 to standby\n"); dev_alert(iss->dev, "cannot set ISP5 to standby\n");
return -ETIMEDOUT; return -ETIMEDOUT;
} }
msleep(1); usleep_range(1000, 1500);
} }
/* Now finally, do the reset */ /* Now finally, do the reset */
...@@ -689,7 +689,7 @@ static int iss_isp_reset(struct iss_device *iss) ...@@ -689,7 +689,7 @@ static int iss_isp_reset(struct iss_device *iss)
dev_alert(iss->dev, "cannot reset ISP5\n"); dev_alert(iss->dev, "cannot reset ISP5\n");
return -ETIMEDOUT; return -ETIMEDOUT;
} }
msleep(1); usleep_range(1000, 1500);
} }
return 0; return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment