V4L/DVB (8930): gspca: The image transfer by bulk is started by the subdrivers.

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Linux Kernel Mailing List
Date: Monday, October 13, 2008 - 3:11 pm

Gitweb:     http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=51977a...
Commit:     51977a8daab6775b91986b566056eb2a2f10202d
Parent:     7b537391dde35d7f412417a95f02f89af08dd2d3
Author:     Jean-Francois Moine <moinejf@free.fr>
AuthorDate: Mon Sep 8 03:22:42 2008 -0300
Committer:  Mauro Carvalho Chehab <mchehab@redhat.com>
CommitDate: Sun Oct 12 09:36:59 2008 -0200

    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>
---
 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 ce54985..58761d9 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
 {
 	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)
@@ -212,11 +212,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);
 }
 
 /*
@@ -502,13 +497,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);
@@ -583,6 +579,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);
--
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
V4L/DVB (8930): gspca: The image transfer by bulk is start ..., Linux Kernel Mailing ..., (Mon Oct 13, 3:11 pm)