Skip to content

Commit

Permalink
USB: mos7840: fix big-endian probe
Browse files Browse the repository at this point in the history
Fix bug in device-type detection on big-endian machines originally
introduced by commit 0eafe4d ("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>
  • Loading branch information
Johan Hovold authored and Greg Kroah-Hartman committed Aug 12, 2013
1 parent 6c1ee66 commit d551ec9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/usb/serial/mos7840.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit d551ec9

Please sign in to comment.