aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/usb.h
diff options
context:
space:
mode:
authorBjørn Mork <bjorn@mork.no>2012-10-31 01:08:39 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-10-31 15:58:11 -0400
commit17b72feb2be14e6d37023267dc0e199e8e0e3fdc (patch)
treeb5f2e9d2c58dc4a64ea4c488e2ff67e287b4e4ad /include/linux/usb.h
parent1b95bee5630766448f40eecaa08b722f256335ea (diff)
USB: add USB_DEVICE_INTERFACE_CLASS macro
Matching on device and interface class with with unspecified subclass and protocol is sometimes useful. This is slightly different from USB_DEVICE_AND_INTERFACE_INFO which requires the full interface class/subclass/protocol triplet. Signed-off-by: Bjørn Mork <bjorn@mork.no> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/usb.h')
-rw-r--r--include/linux/usb.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/include/linux/usb.h b/include/linux/usb.h
index f51f9981de1e..689b14b26c8d 100644
--- a/include/linux/usb.h
+++ b/include/linux/usb.h
@@ -808,6 +808,22 @@ static inline int usb_make_path(struct usb_device *dev, char *buf, size_t size)
808 .bcdDevice_hi = (hi) 808 .bcdDevice_hi = (hi)
809 809
810/** 810/**
811 * USB_DEVICE_INTERFACE_CLASS - describe a usb device with a specific interface class
812 * @vend: the 16 bit USB Vendor ID
813 * @prod: the 16 bit USB Product ID
814 * @cl: bInterfaceClass value
815 *
816 * This macro is used to create a struct usb_device_id that matches a
817 * specific interface class of devices.
818 */
819#define USB_DEVICE_INTERFACE_CLASS(vend, prod, cl) \
820 .match_flags = USB_DEVICE_ID_MATCH_DEVICE | \
821 USB_DEVICE_ID_MATCH_INT_CLASS, \
822 .idVendor = (vend), \
823 .idProduct = (prod), \
824 .bInterfaceClass = (cl)
825
826/**
811 * USB_DEVICE_INTERFACE_PROTOCOL - describe a usb device with a specific interface protocol 827 * USB_DEVICE_INTERFACE_PROTOCOL - describe a usb device with a specific interface protocol
812 * @vend: the 16 bit USB Vendor ID 828 * @vend: the 16 bit USB Vendor ID
813 * @prod: the 16 bit USB Product ID 829 * @prod: the 16 bit USB Product ID