diff options
author | Jean-Francois Moine <moinejf@free.fr> | 2009-12-15 11:23:04 +0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2010-02-26 21:10:27 +0300 |
commit | 47aaca961ffbe6196dd09d6b447d90d9d4598255 (patch) | |
tree | 52cc970fa90f59b3837efc67f8e0f92cd3ebff49 | |
parent | db870875c0e29ba051e58c848e1877df8e85b49f (diff) | |
download | linux-47aaca961ffbe6196dd09d6b447d90d9d4598255.tar.xz |
V4L/DVB (13866): gspca - main: Add the cam flag 'no_urb_create'.
This flag permits subdrivers to create specific transfer URBs.
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r-- | drivers/media/video/gspca/gspca.c | 13 | ||||
-rw-r--r-- | drivers/media/video/gspca/gspca.h | 11 |
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) goto out; } for (;;) { - PDEBUG(D_STREAM, "init transfer alt %d", gspca_dev->alt); - ret = create_urbs(gspca_dev, ep); - if (ret < 0) { - destroy_urbs(gspca_dev); - goto out; + if (!gspca_dev->cam.no_urb_create) { + PDEBUG(D_STREAM, "init transfer alt %d", + gspca_dev->alt); + ret = create_urbs(gspca_dev, ep); + if (ret < 0) { + destroy_urbs(gspca_dev); + goto out; + } } /* 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 { /* device information - set at probe time */ struct cam { - int bulk_size; /* buffer size when image transfer by bulk */ const struct v4l2_pix_format *cam_mode; /* size nmodes */ - char nmodes; const struct framerates *mode_framerates; /* must have size nmode, * just like cam_mode */ - __u8 bulk_nurbs; /* number of URBs in bulk mode + u32 bulk_size; /* buffer size when image transfer by bulk */ + u32 input_flags; /* value for ENUM_INPUT status flags */ + u8 nmodes; /* size of cam_mode */ + u8 no_urb_create; /* don't create transfer URBs */ + u8 bulk_nurbs; /* number of URBs in bulk mode * - cannot be > MAX_NURBS * - when 0 and bulk_size != 0 means * 1 URB and submit done by subdriver */ u8 bulk; /* image transfer by 0:isoc / 1:bulk */ u8 npkt; /* number of packets in an ISOC message * 0 is the default value: 32 packets */ - u32 input_flags; /* value for ENUM_INPUT status flags */ - char reverse_alts; /* Alt settings are in high to low order */ + u8 reverse_alts; /* Alt settings are in high to low order */ }; struct gspca_dev; |