diff options
Diffstat (limited to 'drivers/usb/core/driver.c')
-rw-r--r-- | drivers/usb/core/driver.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/usb/core/driver.c b/drivers/usb/core/driver.c index f536aebc958e..23d7bbd199a5 100644 --- a/drivers/usb/core/driver.c +++ b/drivers/usb/core/driver.c | |||
@@ -622,14 +622,15 @@ int usb_match_one_id(struct usb_interface *interface, | |||
622 | if (!usb_match_device(dev, id)) | 622 | if (!usb_match_device(dev, id)) |
623 | return 0; | 623 | return 0; |
624 | 624 | ||
625 | /* The interface class, subclass, and protocol should never be | 625 | /* The interface class, subclass, protocol and number should never be |
626 | * checked for a match if the device class is Vendor Specific, | 626 | * checked for a match if the device class is Vendor Specific, |
627 | * unless the match record specifies the Vendor ID. */ | 627 | * unless the match record specifies the Vendor ID. */ |
628 | if (dev->descriptor.bDeviceClass == USB_CLASS_VENDOR_SPEC && | 628 | if (dev->descriptor.bDeviceClass == USB_CLASS_VENDOR_SPEC && |
629 | !(id->match_flags & USB_DEVICE_ID_MATCH_VENDOR) && | 629 | !(id->match_flags & USB_DEVICE_ID_MATCH_VENDOR) && |
630 | (id->match_flags & (USB_DEVICE_ID_MATCH_INT_CLASS | | 630 | (id->match_flags & (USB_DEVICE_ID_MATCH_INT_CLASS | |
631 | USB_DEVICE_ID_MATCH_INT_SUBCLASS | | 631 | USB_DEVICE_ID_MATCH_INT_SUBCLASS | |
632 | USB_DEVICE_ID_MATCH_INT_PROTOCOL))) | 632 | USB_DEVICE_ID_MATCH_INT_PROTOCOL | |
633 | USB_DEVICE_ID_MATCH_INT_NUMBER))) | ||
633 | return 0; | 634 | return 0; |
634 | 635 | ||
635 | if ((id->match_flags & USB_DEVICE_ID_MATCH_INT_CLASS) && | 636 | if ((id->match_flags & USB_DEVICE_ID_MATCH_INT_CLASS) && |
@@ -644,6 +645,10 @@ int usb_match_one_id(struct usb_interface *interface, | |||
644 | (id->bInterfaceProtocol != intf->desc.bInterfaceProtocol)) | 645 | (id->bInterfaceProtocol != intf->desc.bInterfaceProtocol)) |
645 | return 0; | 646 | return 0; |
646 | 647 | ||
648 | if ((id->match_flags & USB_DEVICE_ID_MATCH_INT_NUMBER) && | ||
649 | (id->bInterfaceNumber != intf->desc.bInterfaceNumber)) | ||
650 | return 0; | ||
651 | |||
647 | return 1; | 652 | return 1; |
648 | } | 653 | } |
649 | EXPORT_SYMBOL_GPL(usb_match_one_id); | 654 | EXPORT_SYMBOL_GPL(usb_match_one_id); |