aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorJean-Francois Moine <moinejf@free.fr>2010-01-10 14:36:53 -0500
committerMauro Carvalho Chehab <mchehab@redhat.com>2010-02-26 13:10:32 -0500
commitb7a597d11073c4c3db79743d38cc942d324b2233 (patch)
tree247f4a4399968c00e3cd9e35dace05a08cf02d9c /drivers
parent6f081264f835467a3b69edc71753dac9d3ff770a (diff)
V4L/DVB (13925): gspca - main: Change the check of the USB video interface.
Some webcams have many interfaces with the same interface class, so the previous interface check did not work. The new code checks if the interface number is zero or the only one. Signed-off-by: Jean-Francois Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/media/video/gspca/gspca.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/media/video/gspca/gspca.c b/drivers/media/video/gspca/gspca.c
index 351cf8a658fc..04aaa88ce4f5 100644
--- a/drivers/media/video/gspca/gspca.c
+++ b/drivers/media/video/gspca/gspca.c
@@ -2063,14 +2063,11 @@ int gspca_dev_probe(struct usb_interface *intf,
2063 return -ENODEV; 2063 return -ENODEV;
2064 } 2064 }
2065 2065
2066 /* check the interface class and ignore the sound interfaces */ 2066 /* the USB video interface must be the first one */
2067 interface = &intf->cur_altsetting->desc; 2067 interface = &intf->cur_altsetting->desc;
2068 if (interface->bInterfaceClass != USB_CLASS_VENDOR_SPEC 2068 if (dev->config->desc.bNumInterfaces != 1 &&
2069 && interface->bInterfaceClass != USB_CLASS_PER_INTERFACE) { 2069 interface->bInterfaceNumber != 0)
2070 PDEBUG(D_PROBE, "Interface class %d not handled here",
2071 interface->bInterfaceClass);
2072 return -ENODEV; 2070 return -ENODEV;
2073 }
2074 2071
2075 /* create the device */ 2072 /* create the device */
2076 if (dev_size < sizeof *gspca_dev) 2073 if (dev_size < sizeof *gspca_dev)