[prev in list] [next in list] [prev in thread] [next in thread]
List: linux-backports
Subject: [PATCH 3/7] backports: add USB_DEVICE_INTERFACE_NUMBER
From: Hauke Mehrtens <hauke () hauke-m ! de>
Date: 2013-06-17 13:21:03
Message-ID: 1371475267-27179-3-git-send-email-hauke () hauke-m ! de
[Download RAW message or body]
The original version also checked for bInterfaceNumber, which is only
available in more recent kernel versions.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
---
backport/backport-include/linux/usb.h | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/backport/backport-include/linux/usb.h b/backport/backport-include/linux/usb.h
index 6d27479..368da6c 100644
--- a/backport/backport-include/linux/usb.h
+++ b/backport/backport-include/linux/usb.h
@@ -37,6 +37,22 @@
.bInterfaceProtocol = (pr)
#endif /* USB_VENDOR_AND_INTERFACE_INFO */
+#ifndef USB_DEVICE_INTERFACE_NUMBER
+/**
+ * USB_DEVICE_INTERFACE_NUMBER - describe a usb device with a specific interface number
+ * @vend: the 16 bit USB Vendor ID
+ * @prod: the 16 bit USB Product ID
+ * @num: bInterfaceNumber value
+ *
+ * This macro is used to create a struct usb_device_id that matches a
+ * specific interface number of devices.
+ */
+#define USB_DEVICE_INTERFACE_NUMBER(vend, prod, num) \
+ .match_flags = USB_DEVICE_ID_MATCH_DEVICE, \
+ .idVendor = (vend), \
+ .idProduct = (prod)
+#endif /* USB_DEVICE_INTERFACE_NUMBER */
+
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,36)
#ifdef CPTCFG_BACKPORT_OPTION_USB_URB_THREAD_FIX
#define usb_scuttle_anchored_urbs LINUX_BACKPORT(usb_scuttle_anchored_urbs)
--
1.7.10.4
--
To unsubscribe from this list: send the line "unsubscribe backports" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic