summaryrefslogtreecommitdiffstats
path: root/drivers/usb/serial/mos7720.c
diff options
context:
space:
mode:
authorJohan Hovold <jhovold@gmail.com>2013-08-19 13:05:45 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-08-20 02:02:11 +0200
commit3b716caf190ccc6f2a09387210e0e6a26c1d81a4 (patch)
tree5d943c924ddc2eb46cddd66619581ecddb54bba1 /drivers/usb/serial/mos7720.c
parentUSB: mos7720: use GFP_ATOMIC under spinlock (diff)
downloadlinux-3b716caf190ccc6f2a09387210e0e6a26c1d81a4.tar.xz
linux-3b716caf190ccc6f2a09387210e0e6a26c1d81a4.zip
USB: mos7720: fix big-endian control requests
Fix endianess bugs in parallel-port code which caused corrupt control-requests to be issued on big-endian machines. Reported-by: kbuild test robot <fengguang.wu@intel.com> Cc: stable@vger.kernel.org Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/serial/mos7720.c')
-rw-r--r--drivers/usb/serial/mos7720.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/usb/serial/mos7720.c b/drivers/usb/serial/mos7720.c
index 248fda6d06f8..84657e07dc5d 100644
--- a/drivers/usb/serial/mos7720.c
+++ b/drivers/usb/serial/mos7720.c
@@ -382,8 +382,8 @@ static int write_parport_reg_nonblock(struct mos7715_parport *mos_parport,
}
urbtrack->setup->bRequestType = (__u8)0x40;
urbtrack->setup->bRequest = (__u8)0x0e;
- urbtrack->setup->wValue = get_reg_value(reg, dummy);
- urbtrack->setup->wIndex = get_reg_index(reg);
+ urbtrack->setup->wValue = cpu_to_le16(get_reg_value(reg, dummy));
+ urbtrack->setup->wIndex = cpu_to_le16(get_reg_index(reg));
urbtrack->setup->wLength = 0;
usb_fill_control_urb(urbtrack->urb, usbdev,
usb_sndctrlpipe(usbdev, 0),