diff options
author | Jean-Francois Moine <moinejf@free.fr> | 2010-01-05 08:44:00 +0100 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2010-02-26 19:10:29 +0100 |
commit | 52a9d3ef0034f29cef1c5616faa72aa394b01b65 (patch) | |
tree | 07d048f5f7e69d4c06615965fc759068424dba97 /drivers/media/video/gspca | |
parent | V4L/DVB (13896): gspca - zc3xx: Adjust the pas202b exchanges. (diff) | |
download | linux-52a9d3ef0034f29cef1c5616faa72aa394b01b65.tar.xz linux-52a9d3ef0034f29cef1c5616faa72aa394b01b65.zip |
V4L/DVB (13897): gspca - main: Check the interface class at probe time.
The USB video interface was checked as having the number zero, but
some webcams have other values. The test is now done on the interface
class which may be either 255 (vendor spec) or 0 (class per interface).
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')
-rw-r--r-- | drivers/media/video/gspca/gspca.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/media/video/gspca/gspca.c b/drivers/media/video/gspca/gspca.c index 61be007e8fb3..351cf8a658fc 100644 --- a/drivers/media/video/gspca/gspca.c +++ b/drivers/media/video/gspca/gspca.c @@ -2062,9 +2062,13 @@ int gspca_dev_probe(struct usb_interface *intf, PDEBUG(D_ERR, "Too many config"); return -ENODEV; } + + /* check the interface class and ignore the sound interfaces */ interface = &intf->cur_altsetting->desc; - if (interface->bInterfaceNumber > 0) { - PDEBUG(D_ERR, "intf != 0"); + if (interface->bInterfaceClass != USB_CLASS_VENDOR_SPEC + && interface->bInterfaceClass != USB_CLASS_PER_INTERFACE) { + PDEBUG(D_PROBE, "Interface class %d not handled here", + interface->bInterfaceClass); return -ENODEV; } |