diff options
author | Johan Hovold <jhovold@gmail.com> | 2013-08-11 10:49:20 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-08-20 11:43:04 -0400 |
commit | d802afca86ce011832ec9e8d8120f0ada9dd1835 (patch) | |
tree | 6759f9eb33350d805ea539db97f59e9b6bee5acd | |
parent | 0179a37034fd74b573e63e7175dc6e65249b5389 (diff) |
USB: mos7840: fix big-endian probe
commit d551ec9b690f3de65b0091a2e767f1382adc792d upstream.
Fix bug in device-type detection on big-endian machines originally
introduced by commit 0eafe4de ("USB: serial: mos7840: add support for
MCS7810 devices") which always matched on little-endian product ids.
Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/usb/serial/mos7840.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/serial/mos7840.c b/drivers/usb/serial/mos7840.c index b92d3338d055..2c1749da1f7e 100644 --- a/drivers/usb/serial/mos7840.c +++ b/drivers/usb/serial/mos7840.c | |||
@@ -2208,7 +2208,7 @@ static int mos7810_check(struct usb_serial *serial) | |||
2208 | static int mos7840_probe(struct usb_serial *serial, | 2208 | static int mos7840_probe(struct usb_serial *serial, |
2209 | const struct usb_device_id *id) | 2209 | const struct usb_device_id *id) |
2210 | { | 2210 | { |
2211 | u16 product = serial->dev->descriptor.idProduct; | 2211 | u16 product = le16_to_cpu(serial->dev->descriptor.idProduct); |
2212 | u8 *buf; | 2212 | u8 *buf; |
2213 | int device_type; | 2213 | int device_type; |
2214 | 2214 | ||