diff options
author | Jean-Francois Moine <moinejf@free.fr> | 2008-09-08 02:22:42 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2008-10-12 07:36:59 -0400 |
commit | 51977a8daab6775b91986b566056eb2a2f10202d (patch) | |
tree | 0131c99b26eca8ced4b973406d477b317539022f /drivers/media/video/gspca/gspca.c | |
parent | 7b537391dde35d7f412417a95f02f89af08dd2d3 (diff) |
V4L/DVB (8930): gspca: The image transfer by bulk is started by the subdrivers.
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/gspca/gspca.c')
-rw-r--r-- | drivers/media/video/gspca/gspca.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/media/video/gspca/gspca.c b/drivers/media/video/gspca/gspca.c index ce5498527fc2..58761d9809f7 100644 --- a/drivers/media/video/gspca/gspca.c +++ b/drivers/media/video/gspca/gspca.c | |||
@@ -185,7 +185,7 @@ static void bulk_irq(struct urb *urb | |||
185 | { | 185 | { |
186 | struct gspca_dev *gspca_dev = (struct gspca_dev *) urb->context; | 186 | struct gspca_dev *gspca_dev = (struct gspca_dev *) urb->context; |
187 | struct gspca_frame *frame; | 187 | struct gspca_frame *frame; |
188 | int j, ret; | 188 | int j; |
189 | 189 | ||
190 | PDEBUG(D_PACK, "bulk irq"); | 190 | PDEBUG(D_PACK, "bulk irq"); |
191 | if (!gspca_dev->streaming) | 191 | if (!gspca_dev->streaming) |
@@ -212,11 +212,6 @@ static void bulk_irq(struct urb *urb | |||
212 | urb->transfer_buffer, | 212 | urb->transfer_buffer, |
213 | urb->actual_length); | 213 | urb->actual_length); |
214 | } | 214 | } |
215 | /* resubmit the URB */ | ||
216 | urb->status = 0; | ||
217 | ret = usb_submit_urb(urb, GFP_ATOMIC); | ||
218 | if (ret < 0) | ||
219 | PDEBUG(D_ERR|D_PACK, "usb_submit_urb() ret %d", ret); | ||
220 | } | 215 | } |
221 | 216 | ||
222 | /* | 217 | /* |
@@ -502,13 +497,14 @@ static int create_urbs(struct gspca_dev *gspca_dev, | |||
502 | PDEBUG(D_STREAM, | 497 | PDEBUG(D_STREAM, |
503 | "isoc %d pkts size %d = bsize:%d", | 498 | "isoc %d pkts size %d = bsize:%d", |
504 | npkt, psize, bsize); | 499 | npkt, psize, bsize); |
500 | nurbs = DEF_NURBS; | ||
505 | } else { | 501 | } else { |
506 | npkt = 0; | 502 | npkt = 0; |
507 | bsize = psize; | 503 | bsize = psize; |
508 | PDEBUG(D_STREAM, "bulk bsize:%d", bsize); | 504 | PDEBUG(D_STREAM, "bulk bsize:%d", bsize); |
505 | nurbs = 1; | ||
509 | } | 506 | } |
510 | 507 | ||
511 | nurbs = DEF_NURBS; | ||
512 | gspca_dev->nurbs = nurbs; | 508 | gspca_dev->nurbs = nurbs; |
513 | for (n = 0; n < nurbs; n++) { | 509 | for (n = 0; n < nurbs; n++) { |
514 | urb = usb_alloc_urb(npkt, GFP_KERNEL); | 510 | urb = usb_alloc_urb(npkt, GFP_KERNEL); |
@@ -583,6 +579,10 @@ static int gspca_init_transfer(struct gspca_dev *gspca_dev) | |||
583 | gspca_dev->streaming = 1; | 579 | gspca_dev->streaming = 1; |
584 | atomic_set(&gspca_dev->nevent, 0); | 580 | atomic_set(&gspca_dev->nevent, 0); |
585 | 581 | ||
582 | /* start the bulk transfer is done by the subdriver */ | ||
583 | if (gspca_dev->bulk) | ||
584 | break; | ||
585 | |||
586 | /* submit the URBs */ | 586 | /* submit the URBs */ |
587 | for (n = 0; n < gspca_dev->nurbs; n++) { | 587 | for (n = 0; n < gspca_dev->nurbs; n++) { |
588 | ret = usb_submit_urb(gspca_dev->urb[n], GFP_KERNEL); | 588 | ret = usb_submit_urb(gspca_dev->urb[n], GFP_KERNEL); |