diff options
| author | Thomas Pugliese <thomas.pugliese@gmail.com> | 2013-10-07 11:07:51 -0400 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-10-19 08:19:21 -0400 |
| commit | 1653d2f88f43f6780eace1faeeb7b7adde8c10fb (patch) | |
| tree | 0848ebaf8648b8ed15abf40356cd2166038fce8e /include/linux/usb | |
| parent | 679ee475a1c19243c8f50a5a76f6b7519b24c1a3 (diff) | |
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/linux/usb')
| -rw-r--r-- | include/linux/usb/wusb-wa.h | 6 |
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 { | |||
| 279 | struct usb_wa_descriptor { | 279 | struct usb_wa_descriptor { |
| 280 | u8 bLength; | 280 | u8 bLength; |
| 281 | u8 bDescriptorType; | 281 | u8 bDescriptorType; |
| 282 | u16 bcdWAVersion; | 282 | __le16 bcdWAVersion; |
| 283 | u8 bNumPorts; /* don't use!! */ | 283 | u8 bNumPorts; /* don't use!! */ |
| 284 | u8 bmAttributes; /* Reserved == 0 */ | 284 | u8 bmAttributes; /* Reserved == 0 */ |
| 285 | u16 wNumRPipes; | 285 | __le16 wNumRPipes; |
| 286 | u16 wRPipeMaxBlock; | 286 | __le16 wRPipeMaxBlock; |
| 287 | u8 bRPipeBlockSize; | 287 | u8 bRPipeBlockSize; |
| 288 | u8 bPwrOn2PwrGood; | 288 | u8 bPwrOn2PwrGood; |
| 289 | u8 bNumMMCIEs; | 289 | u8 bNumMMCIEs; |
