summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean-François Moine <moinejf@free.fr>2011-09-23 07:15:50 (GMT)
committerMauro Carvalho Chehab <mchehab@redhat.com>2011-09-24 02:30:06 (GMT)
commit9ba4a4ba3c170e618f75213fb03fe2deda754195 (patch)
tree4b899d65ebb892eda304a21d0f36c6f7b463ff05
parent8f12b1ab2fac0edbc5d8ad64f962fe40662c5b72 (diff)
downloadlinux-9ba4a4ba3c170e618f75213fb03fe2deda754195.tar.xz
[media] gspca - spca1528: Increase the status waiting time
Some webcams ask for a greater time to start. This patch increases the delay before timeout error on capture start. Signed-off-by: Jean-François Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r--drivers/media/video/gspca/spca1528.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/media/video/gspca/spca1528.c b/drivers/media/video/gspca/spca1528.c
index 4131be5d..565c2f1 100644
--- a/drivers/media/video/gspca/spca1528.c
+++ b/drivers/media/video/gspca/spca1528.c
@@ -226,14 +226,16 @@ static void reg_wb(struct gspca_dev *gspca_dev,
static void wait_status_0(struct gspca_dev *gspca_dev)
{
- int i;
+ int i, w;
- i = 20;
+ i = 16;
+ w = 0;
do {
reg_r(gspca_dev, 0x21, 0x0000, 1);
if (gspca_dev->usb_buf[0] == 0)
return;
- msleep(30);
+ w += 15;
+ msleep(w);
} while (--i > 0);
PDEBUG(D_ERR, "wait_status_0 timeout");
gspca_dev->usb_err = -ETIME;