From 6c6d5209e7a07fef8638f3010d3509654f64b260 Mon Sep 17 00:00:00 2001 From: Gustavo Padovan Date: Tue, 10 Jul 2012 19:10:06 -0300 Subject: [PATCH] --- yaml --- r: 317065 b: refs/heads/master c: d81a5d1956731c453b85c141458d4ff5d6cc5366 h: refs/heads/master i: 317063: fbaee8e9953bca3952c7776ee640bf661a290713 v: v3 --- [refs] | 2 +- trunk/include/linux/usb.h | 21 +++++++++++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 39dad72ec749..1a4750c86382 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 925aa46ba963a4da6d8ee6ab1d04a02ffa8db62b +refs/heads/master: d81a5d1956731c453b85c141458d4ff5d6cc5366 diff --git a/trunk/include/linux/usb.h b/trunk/include/linux/usb.h index 873956bec25e..30d1ae38eab1 100644 --- a/trunk/include/linux/usb.h +++ b/trunk/include/linux/usb.h @@ -861,6 +861,27 @@ static inline int usb_make_path(struct usb_device *dev, char *buf, size_t size) .bInterfaceSubClass = (sc), \ .bInterfaceProtocol = (pr) +/** + * USB_VENDOR_AND_INTERFACE_INFO - describe a specific usb vendor with a class of usb interfaces + * @vend: the 16 bit USB Vendor ID + * @cl: bInterfaceClass value + * @sc: bInterfaceSubClass value + * @pr: bInterfaceProtocol value + * + * This macro is used to create a struct usb_device_id that matches a + * specific vendor with a specific class of interfaces. + * + * This is especially useful when explicitly matching devices that have + * vendor specific bDeviceClass values, but standards-compliant interfaces. + */ +#define USB_VENDOR_AND_INTERFACE_INFO(vend, cl, sc, pr) \ + .match_flags = USB_DEVICE_ID_MATCH_INT_INFO \ + | USB_DEVICE_ID_MATCH_VENDOR, \ + .idVendor = (vend), \ + .bInterfaceClass = (cl), \ + .bInterfaceSubClass = (sc), \ + .bInterfaceProtocol = (pr) + /* ----------------------------------------------------------------------- */ /* Stuff for dynamic usb ids */