cdc-wdm endianness fixes
commitfa4144b758d58341d4e082ac2af259e97fbcbeee
authorAl Viro <viro@ftp.linux.org.uk>
Mon, 2 Jun 2008 09:59:02 +0000 (2 10:59 +0100)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 4 Jun 2008 15:06:01 +0000 (4 08:06 -0700)
tree92e32411121076f717183c8ef7ba0ce2afe8ba3f
parent76e6f2526ff69eba466f583d94beb7cf6b0bddd6
cdc-wdm endianness fixes

* wMaxPacketSize is le16; copying it to a field of local structure and then
  using that field as host-endian (size of object to be allocated) is broken.
* bMaxPacketSize0 is 8-bit; feeding it to le16_to_cpu() is bogus and since the
  result is used as host-endian, it's not even misspelled cpu_to_le16().

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/usb/class/cdc-wdm.c