Skip to content

Commit

Permalink
[media] gspca - spca1528: Increase the status waiting time
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
  • Loading branch information
moinejf authored and Mauro Carvalho Chehab committed Sep 24, 2011
1 parent 8f12b1a commit 9ba4a4b
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions drivers/media/video/gspca/spca1528.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 9ba4a4b

Please sign in to comment.