diff options
author | Jean-Francois Moine <moinejf@free.fr> | 2008-09-08 08:22:42 +0200 |
---|---|---|
committer | Jean-Francois Moine <moinejf@free.fr> | 2008-09-08 08:22:42 +0200 |
commit | 6c1f924f6d750372737a9ce02f7f9b4a5756b1a1 (patch) | |
tree | 74710d09638bae46c7d639276fae11bc5f94debd /linux | |
parent | 5cd328b41353c9e4dded3511149214efe0198c57 (diff) | |
download | mediapointer-dvb-s2-6c1f924f6d750372737a9ce02f7f9b4a5756b1a1.tar.gz mediapointer-dvb-s2-6c1f924f6d750372737a9ce02f7f9b4a5756b1a1.tar.bz2 |
gspca: The image transfer by bulk is started by the subdrivers.
From: Jean-Francois Moine <moinejf@free.fr>
Priority: normal
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Diffstat (limited to 'linux')
-rw-r--r-- | linux/drivers/media/video/gspca/gspca.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/linux/drivers/media/video/gspca/gspca.c b/linux/drivers/media/video/gspca/gspca.c index 89b2efa25..8c98c7a05 100644 --- a/linux/drivers/media/video/gspca/gspca.c +++ b/linux/drivers/media/video/gspca/gspca.c @@ -195,7 +195,7 @@ static void bulk_irq(struct urb *urb { struct gspca_dev *gspca_dev = (struct gspca_dev *) urb->context; struct gspca_frame *frame; - int j, ret; + int j; PDEBUG(D_PACK, "bulk irq"); if (!gspca_dev->streaming) @@ -222,11 +222,6 @@ static void bulk_irq(struct urb *urb urb->transfer_buffer, urb->actual_length); } - /* resubmit the URB */ - urb->status = 0; - ret = usb_submit_urb(urb, GFP_ATOMIC); - if (ret < 0) - PDEBUG(D_ERR|D_PACK, "usb_submit_urb() ret %d", ret); } /* @@ -512,13 +507,14 @@ static int create_urbs(struct gspca_dev *gspca_dev, PDEBUG(D_STREAM, "isoc %d pkts size %d = bsize:%d", npkt, psize, bsize); + nurbs = DEF_NURBS; } else { npkt = 0; bsize = psize; PDEBUG(D_STREAM, "bulk bsize:%d", bsize); + nurbs = 1; } - nurbs = DEF_NURBS; gspca_dev->nurbs = nurbs; for (n = 0; n < nurbs; n++) { urb = usb_alloc_urb(npkt, GFP_KERNEL); @@ -593,6 +589,10 @@ static int gspca_init_transfer(struct gspca_dev *gspca_dev) gspca_dev->streaming = 1; atomic_set(&gspca_dev->nevent, 0); + /* start the bulk transfer is done by the subdriver */ + if (gspca_dev->bulk) + break; + /* submit the URBs */ for (n = 0; n < gspca_dev->nurbs; n++) { ret = usb_submit_urb(gspca_dev->urb[n], GFP_KERNEL); |