Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 124248
b: refs/heads/master
c: c9455fb
h: refs/heads/master
v: v3
  • Loading branch information
Mauro Carvalho Chehab committed Dec 29, 2008
1 parent 8e7c065 commit f772096
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 14 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 6e4ae872c580d6a388a52ddfdfc93b4215af1180
refs/heads/master: c9455fbb159711ca7a2ee5a67f0e7ca43287bbd7
38 changes: 25 additions & 13 deletions trunk/drivers/media/video/em28xx/em28xx-video.c
Original file line number Diff line number Diff line change
Expand Up @@ -2196,12 +2196,6 @@ static int em28xx_usb_probe(struct usb_interface *interface,
return -ENODEV;
}

em28xx_err(DRIVER_NAME " new video device (%04x:%04x): interface %i, class %i\n",
udev->descriptor.idVendor,
udev->descriptor.idProduct,
ifnum,
interface->altsetting[0].desc.bInterfaceClass);

endpoint = &interface->cur_altsetting->endpoint[0].desc;

/* check if the device has the iso in endpoint at the correct place */
Expand All @@ -2212,21 +2206,39 @@ static int em28xx_usb_probe(struct usb_interface *interface,
/* It's a newer em2874/em2875 device */
isoc_pipe = 0;
} else {
int check_interface = 1;
isoc_pipe = 1;
endpoint = &interface->cur_altsetting->endpoint[1].desc;
if ((endpoint->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) !=
USB_ENDPOINT_XFER_ISOC) {
em28xx_err(DRIVER_NAME " probing error: endpoint is non-ISO endpoint!\n");
em28xx_devused &= ~(1<<nr);
return -ENODEV;
}
if ((endpoint->bEndpointAddress & USB_ENDPOINT_DIR_MASK) == USB_DIR_OUT) {
em28xx_err(DRIVER_NAME " probing error: endpoint is ISO OUT endpoint!\n");
USB_ENDPOINT_XFER_ISOC)
check_interface = 0;

if ((endpoint->bEndpointAddress & USB_ENDPOINT_DIR_MASK) == USB_DIR_OUT)
check_interface = 0;

if (!check_interface) {
em28xx_err(DRIVER_NAME " video device (%04x:%04x): "
"interface %i, class %i found.\n",
udev->descriptor.idVendor,
udev->descriptor.idProduct,
ifnum,
interface->altsetting[0].desc.bInterfaceClass);

em28xx_err(DRIVER_NAME " This is an anciliary "
"interface not used by the driver\n");

em28xx_devused &= ~(1<<nr);
return -ENODEV;
}

}

em28xx_err(DRIVER_NAME " new video device (%04x:%04x): interface %i, class %i\n",
udev->descriptor.idVendor,
udev->descriptor.idProduct,
ifnum,
interface->altsetting[0].desc.bInterfaceClass);

if (nr >= EM28XX_MAXBOARDS) {
printk(DRIVER_NAME ": Supports only %i em28xx boards.\n",
EM28XX_MAXBOARDS);
Expand Down

0 comments on commit f772096

Please sign in to comment.