UPSTREAM: USB: allow match on bInterfaceNumber
authorBjørn Mork <bjorn@mork.no>
Fri, 18 May 2012 19:27:43 +0000 (21:27 +0200)
committerGerrit <chrome-bot@google.com>
Tue, 9 Oct 2012 17:53:59 +0000 (10:53 -0700)
commit30423b2b91b2ba81588efb13001916d9ad200a05
tree1a1553c4e32ea6d8b094b6ea2cf14b2c948b425f
parent14667949f42de39c36f0121d71b93f274d1b3888
UPSTREAM: USB: allow match on bInterfaceNumber

Some composite USB devices provide multiple interfaces
with different functions, all using "vendor-specific"
for class/subclass/protocol.  Another OS use interface
numbers to match the driver and interface. It seems
these devices are designed with that in mind - using
static interface numbers for the different functions.

This adds support for matching against the
bInterfaceNumber, allowing such devices to be supported
without having to resort to testing against interface
number whitelists and/or blacklists in the probe.

Signed-off-by: Bjørn Mork <bjorn@mork.no>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 81df2d594340dcb6d1a02191976be88a1ca8120c)

Change-Id: I4c3449d5d58a06566a2f4279366c07ccda5da0a1
Signed-off-by: Ben Chan <benchan@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/34928
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
drivers/usb/core/driver.c
drivers/usb/core/message.c
drivers/usb/core/sysfs.c
include/linux/mod_devicetable.h
include/linux/usb.h
scripts/mod/file2alias.c