aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/gspca/gspca.c
diff options
context:
space:
mode:
authorJean-Francois Moine <moinejf@free.fr>2008-10-23 06:29:51 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2008-12-29 14:53:29 -0500
commitff374747ce5357eedf034b44ec3111cec28d50d5 (patch)
treea012bf91305dcd7f95ed9e62317700859982ea00 /drivers/media/video/gspca/gspca.c
parent8fe2f1d522bb599eccfff6ef4fc55f7b7abbaeec (diff)
V4L/DVB (9545): gspca: Add a flag for empty ISOC packets.
- This flag is needed by some subdrivers as tv8532 for start of frame detection. 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.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/media/video/gspca/gspca.c b/drivers/media/video/gspca/gspca.c
index afddb18024a8..8a528c97aae0 100644
--- a/drivers/media/video/gspca/gspca.c
+++ b/drivers/media/video/gspca/gspca.c
@@ -150,8 +150,11 @@ static void fill_frame(struct gspca_dev *gspca_dev,
150 150
151 /* check the packet status and length */ 151 /* check the packet status and length */
152 len = urb->iso_frame_desc[i].actual_length; 152 len = urb->iso_frame_desc[i].actual_length;
153 if (len == 0) 153 if (len == 0) {
154 if (gspca_dev->empty_packet == 0)
155 gspca_dev->empty_packet = 1;
154 continue; 156 continue;
157 }
155 st = urb->iso_frame_desc[i].status; 158 st = urb->iso_frame_desc[i].status;
156 if (st) { 159 if (st) {
157 PDEBUG(D_ERR, 160 PDEBUG(D_ERR,
@@ -1858,6 +1861,7 @@ int gspca_dev_probe(struct usb_interface *intf,
1858 gspca_dev->nbalt = intf->num_altsetting; 1861 gspca_dev->nbalt = intf->num_altsetting;
1859 gspca_dev->sd_desc = sd_desc; 1862 gspca_dev->sd_desc = sd_desc;
1860 gspca_dev->nbufread = 2; 1863 gspca_dev->nbufread = 2;
1864 gspca_dev->empty_packet = -1; /* don't check the empty packets */
1861 1865
1862 /* configure the subdriver and initialize the USB device */ 1866 /* configure the subdriver and initialize the USB device */
1863 ret = gspca_dev->sd_desc->config(gspca_dev, id); 1867 ret = gspca_dev->sd_desc->config(gspca_dev, id);