aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/tools/usb
diff options
context:
space:
mode:
authorTal Shorer <tal.shorer@gmail.com>2016-11-18 14:17:26 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-12-05 16:37:10 +0100
commitb9c2a2a39898d55b9fe13aa1fe15891e37bc9087 (patch)
tree783ed0c5079b080e8e369bebeaad36a17ee4952b /tools/usb
parentUSB: OHCI: ohci-pxa27x: remove useless functions (diff)
downloadwireguard-linux-b9c2a2a39898d55b9fe13aa1fe15891e37bc9087.tar.xz
wireguard-linux-b9c2a2a39898d55b9fe13aa1fe15891e37bc9087.zip
usb: hcd.h: construct hub class request constants from simpler constants
Currently, each hub class request constant is defined by a line like: #define ClearHubFeature (0x2000 | USB_REQ_CLEAR_FEATURE) The "magic" number for the high byte is one of 0x20, 0xa0, 0x23, 0xa3. The 0x80 bit that changes inditace USB_DIR_IN, and the 0x03 that pops up is the difference between USB_RECIP_DEVICE (0x00) and USB_RECIP_OTHER (0x03). The constant 0x20 bit is USB_TYPE_CLASS. This patch eliminates those magic numbers by defining a macro to help construct these hub class request from simpler constants. Note that USB_RT_HUB is defined as (USB_TYPE_CLASS | USB_RECIP_DEVICE) and that USB_RT_PORT is defined as (USB_TYPE_CLASS | USB_RECIP_OTHER). Signed-off-by: Tal Shorer <tal.shorer@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'tools/usb')
0 files changed, 0 insertions, 0 deletions