Skip to content

Commit

Permalink
USB: Add USB_DEVICE_INTERFACE_PROTOCOL macro
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jan Kratochvil authored and Dmitry Torokhov committed Jul 10, 2007
1 parent 71780f5 commit f836ac8
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions include/linux/usb.h
Original file line number Diff line number Diff line change
Expand Up @@ -728,6 +728,22 @@ static inline int usb_endpoint_is_isoc_out(const struct usb_endpoint_descriptor
.idVendor = (vend), .idProduct = (prod), \
.bcdDevice_lo = (lo), .bcdDevice_hi = (hi)

/**
* USB_DEVICE_INTERFACE_PROTOCOL - macro used to describe a usb
* device with a specific interface protocol
* @vend: the 16 bit USB Vendor ID
* @prod: the 16 bit USB Product ID
* @pr: bInterfaceProtocol value
*
* This macro is used to create a struct usb_device_id that matches a
* specific interface protocol of devices.
*/
#define USB_DEVICE_INTERFACE_PROTOCOL(vend,prod,pr) \
.match_flags = USB_DEVICE_ID_MATCH_DEVICE | USB_DEVICE_ID_MATCH_INT_PROTOCOL, \
.idVendor = (vend), \
.idProduct = (prod), \
.bInterfaceProtocol = (pr)

/**
* USB_DEVICE_INFO - macro used to describe a class of usb devices
* @cl: bDeviceClass value
Expand Down

0 comments on commit f836ac8

Please sign in to comment.