aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Kratochvil <honza@jikos.cz>2007-05-09 00:26:15 -0400
committerDmitry Torokhov <dtor@insightbb.com>2007-07-10 00:35:14 -0400
commitf836ac808f031e84d7d73a3540f30f38036bb41e (patch)
treed59c95a6fe10505fd86e025931baa76af26f0793
parent71780f59e127bb281a9302d430495ca9586c14e7 (diff)
USB: Add USB_DEVICE_INTERFACE_PROTOCOL macro
The USB_DEVICE_INTERFACE_PROTOCOL will allow to match one interface protocol of vendor specific device. This macro is used in patch adding support for xbox360 to xpad.c Signed-off-by: Jan Kratochvil <honza@jikos.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
-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 94bd38a6d947..56aa2ee21f1b 100644
--- a/include/linux/usb.h
+++ b/include/linux/usb.h
@@ -729,6 +729,22 @@ static inline int usb_endpoint_is_isoc_out(const struct usb_endpoint_descriptor
729 .bcdDevice_lo = (lo), .bcdDevice_hi = (hi) 729 .bcdDevice_lo = (lo), .bcdDevice_hi = (hi)
730 730
731/** 731/**
732 * USB_DEVICE_INTERFACE_PROTOCOL - macro used to describe a usb
733 * device with a specific interface protocol
734 * @vend: the 16 bit USB Vendor ID
735 * @prod: the 16 bit USB Product ID
736 * @pr: bInterfaceProtocol value
737 *
738 * This macro is used to create a struct usb_device_id that matches a
739 * specific interface protocol of devices.
740 */
741#define USB_DEVICE_INTERFACE_PROTOCOL(vend,prod,pr) \
742 .match_flags = USB_DEVICE_ID_MATCH_DEVICE | USB_DEVICE_ID_MATCH_INT_PROTOCOL, \
743 .idVendor = (vend), \
744 .idProduct = (prod), \
745 .bInterfaceProtocol = (pr)
746
747/**
732 * USB_DEVICE_INFO - macro used to describe a class of usb devices 748 * USB_DEVICE_INFO - macro used to describe a class of usb devices
733 * @cl: bDeviceClass value 749 * @cl: bDeviceClass value
734 * @sc: bDeviceSubClass value 750 * @sc: bDeviceSubClass value