aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/wusbcore/wa-rpipe.c
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 /drivers/usb/wusbcore/wa-rpipe.c
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 'drivers/usb/wusbcore/wa-rpipe.c')
-rw-r--r--drivers/usb/wusbcore/wa-rpipe.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/wusbcore/wa-rpipe.c b/drivers/usb/wusbcore/wa-rpipe.c
index 50de1d2c7b72..1ed068accb76 100644
--- a/drivers/usb/wusbcore/wa-rpipe.c
+++ b/drivers/usb/wusbcore/wa-rpipe.c
@@ -480,7 +480,7 @@ error:
*/
int wa_rpipes_create(struct wahc *wa)
{
- wa->rpipes = wa->wa_descr->wNumRPipes;
+ wa->rpipes = le16_to_cpu(wa->wa_descr->wNumRPipes);
wa->rpipe_bm = kzalloc(BITS_TO_LONGS(wa->rpipes)*sizeof(unsigned long),
GFP_KERNEL);
if (wa->rpipe_bm == NULL)