aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorThomas Pugliese <thomas.pugliese@gmail.com>2013-10-07 10:07:51 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-10-19 05:19:21 -0700
commit1653d2f88f43f6780eace1faeeb7b7adde8c10fb (patch)
tree0848ebaf8648b8ed15abf40356cd2166038fce8e /include
parentusb: wusbcore: serialize access to the HWA data out endpoint (diff)
downloadlinux-dev-1653d2f88f43f6780eace1faeeb7b7adde8c10fb.tar.xz
linux-dev-1653d2f88f43f6780eace1faeeb7b7adde8c10fb.zip
usb: wusbcore: preserve endianness of cached descriptors
Do not overwrite the multi-byte fields of usb_wa_descriptor with their cpu format values after reading the descriptor. Leave the values as __le16 and swap on use. This is more consistent with other uses of USB descriptors. Signed-off-by: Thomas Pugliese <thomas.pugliese@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/usb/wusb-wa.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/linux/usb/wusb-wa.h b/include/linux/usb/wusb-wa.h
index 9ae7e299bf77..c1257130769b 100644
--- a/include/linux/usb/wusb-wa.h
+++ b/include/linux/usb/wusb-wa.h
@@ -279,11 +279,11 @@ struct wa_xfer_result {
struct usb_wa_descriptor {
u8 bLength;
u8 bDescriptorType;
- u16 bcdWAVersion;
+ __le16 bcdWAVersion;
u8 bNumPorts; /* don't use!! */
u8 bmAttributes; /* Reserved == 0 */
- u16 wNumRPipes;
- u16 wRPipeMaxBlock;
+ __le16 wNumRPipes;
+ __le16 wRPipeMaxBlock;
u8 bRPipeBlockSize;
u8 bPwrOn2PwrGood;
u8 bNumMMCIEs;