aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/gspca
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/video/gspca')
-rw-r--r--drivers/media/video/gspca/gspca.c13
-rw-r--r--drivers/media/video/gspca/gspca.h11
2 files changed, 14 insertions, 10 deletions
diff --git a/drivers/media/video/gspca/gspca.c b/drivers/media/video/gspca/gspca.c
index 0e6a4ec0fec9..61be007e8fb3 100644
--- a/drivers/media/video/gspca/gspca.c
+++ b/drivers/media/video/gspca/gspca.c
@@ -607,11 +607,14 @@ static int gspca_init_transfer(struct gspca_dev *gspca_dev)
607 goto out; 607 goto out;
608 } 608 }
609 for (;;) { 609 for (;;) {
610 PDEBUG(D_STREAM, "init transfer alt %d", gspca_dev->alt); 610 if (!gspca_dev->cam.no_urb_create) {
611 ret = create_urbs(gspca_dev, ep); 611 PDEBUG(D_STREAM, "init transfer alt %d",
612 if (ret < 0) { 612 gspca_dev->alt);
613 destroy_urbs(gspca_dev); 613 ret = create_urbs(gspca_dev, ep);
614 goto out; 614 if (ret < 0) {
615 destroy_urbs(gspca_dev);
616 goto out;
617 }
615 } 618 }
616 619
617 /* clear the bulk endpoint */ 620 /* clear the bulk endpoint */
diff --git a/drivers/media/video/gspca/gspca.h b/drivers/media/video/gspca/gspca.h
index f0b4cbc33bf3..790dad736888 100644
--- a/drivers/media/video/gspca/gspca.h
+++ b/drivers/media/video/gspca/gspca.h
@@ -54,20 +54,21 @@ struct framerates {
54 54
55/* device information - set at probe time */ 55/* device information - set at probe time */
56struct cam { 56struct cam {
57 int bulk_size; /* buffer size when image transfer by bulk */
58 const struct v4l2_pix_format *cam_mode; /* size nmodes */ 57 const struct v4l2_pix_format *cam_mode; /* size nmodes */
59 char nmodes;
60 const struct framerates *mode_framerates; /* must have size nmode, 58 const struct framerates *mode_framerates; /* must have size nmode,
61 * just like cam_mode */ 59 * just like cam_mode */
62 __u8 bulk_nurbs; /* number of URBs in bulk mode 60 u32 bulk_size; /* buffer size when image transfer by bulk */
61 u32 input_flags; /* value for ENUM_INPUT status flags */
62 u8 nmodes; /* size of cam_mode */
63 u8 no_urb_create; /* don't create transfer URBs */
64 u8 bulk_nurbs; /* number of URBs in bulk mode
63 * - cannot be > MAX_NURBS 65 * - cannot be > MAX_NURBS
64 * - when 0 and bulk_size != 0 means 66 * - when 0 and bulk_size != 0 means
65 * 1 URB and submit done by subdriver */ 67 * 1 URB and submit done by subdriver */
66 u8 bulk; /* image transfer by 0:isoc / 1:bulk */ 68 u8 bulk; /* image transfer by 0:isoc / 1:bulk */
67 u8 npkt; /* number of packets in an ISOC message 69 u8 npkt; /* number of packets in an ISOC message
68 * 0 is the default value: 32 packets */ 70 * 0 is the default value: 32 packets */
69 u32 input_flags; /* value for ENUM_INPUT status flags */ 71 u8 reverse_alts; /* Alt settings are in high to low order */
70 char reverse_alts; /* Alt settings are in high to low order */
71}; 72};
72 73
73struct gspca_dev; 74struct gspca_dev;