[media] gspca - main: isoc mode devices are never low speed
authorHans de Goede <hdegoede@redhat.com>
Sun, 1 Jan 2012 16:34:58 +0000 (13:34 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Fri, 6 Jan 2012 11:05:32 +0000 (09:05 -0200)
Quoting from the official usb 20 spec:
"5.6.4 Isochronous Transfer Bus Access Constraints

Isochronous transfers can only be used by full-speed and high-speed devices."

This means that for code paths which are isoc mode only, we don't need to
check for the device being low speed, simplifying the code.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/video/gspca/gspca.c

index 4a3bbff..a8643bc 100644 (file)
@@ -818,10 +818,7 @@ static int create_urbs(struct gspca_dev *gspca_dev,
                                                    ep->desc.bEndpointAddress);
                        urb->transfer_flags = URB_ISO_ASAP
                                        | URB_NO_TRANSFER_DMA_MAP;
-                       if (gspca_dev->dev->speed == USB_SPEED_LOW)
-                               urb->interval = ep->desc.bInterval;
-                       else
-                               urb->interval = 1 << (ep->desc.bInterval - 1);
+                       urb->interval = 1 << (ep->desc.bInterval - 1);
                        urb->complete = isoc_irq;
                        urb->number_of_packets = npkt;
                        for (i = 0; i < npkt; i++) {