mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-24 05:29:04 -04:00
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>
This commit is contained in:
parent
679ee475a1
commit
1653d2f88f
3 changed files with 7 additions and 11 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue