diff options
author | Johan Hovold <jhovold@gmail.com> | 2013-08-11 16:49:20 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-08-12 13:52:35 -0700 |
commit | d551ec9b690f3de65b0091a2e767f1382adc792d (patch) | |
tree | 7e5ea67cdcfec07feea1a46dc732788a3beaa4e5 /drivers/usb/serial/mos7840.c | |
parent | 6c1ee66a0b2bdbd64c078fba684d640cf2fd38a9 (diff) | |
download | lwn-d551ec9b690f3de65b0091a2e767f1382adc792d.tar.gz lwn-d551ec9b690f3de65b0091a2e767f1382adc792d.zip |
USB: mos7840: fix big-endian probe
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>
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/mos7840.c')
-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 d953d674f222..3bac4693c038 100644 --- a/drivers/usb/serial/mos7840.c +++ b/drivers/usb/serial/mos7840.c @@ -2193,7 +2193,7 @@ static int mos7810_check(struct usb_serial *serial) static int mos7840_probe(struct usb_serial *serial, const struct usb_device_id *id) { - u16 product = serial->dev->descriptor.idProduct; + u16 product = le16_to_cpu(serial->dev->descriptor.idProduct); u8 *buf; int device_type; |