]> rtime.felk.cvut.cz Git - linux-imx.git/commitdiff
USB: option: idVendor and idProduct are __le16
authorBjørn Mork <bjorn@mork.no>
Wed, 31 Oct 2012 05:08:41 +0000 (06:08 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 31 Oct 2012 19:58:12 +0000 (12:58 -0700)
The exception is needed on big endian systems too.

Signed-off-by: Bjørn Mork <bjorn@mork.no>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/serial/option.c

index 05fa671e13d73408474b854c685bf472edc9f9ba..5839f4d662dc142372dd15383e3ae59b949174ca 100644 (file)
@@ -1358,9 +1358,9 @@ static int option_probe(struct usb_serial *serial,
         * Don't bind network interface on Samsung GT-B3730, it is handled by
         * a separate module.
         */
-       if (dev_desc->idVendor == SAMSUNG_VENDOR_ID &&
-               dev_desc->idProduct == SAMSUNG_PRODUCT_GT_B3730 &&
-               iface_desc->bInterfaceClass != USB_CLASS_CDC_DATA)
+       if (dev_desc->idVendor == cpu_to_le16(SAMSUNG_VENDOR_ID) &&
+           dev_desc->idProduct == cpu_to_le16(SAMSUNG_PRODUCT_GT_B3730) &&
+           iface_desc->bInterfaceClass != USB_CLASS_CDC_DATA)
                return -ENODEV;
 
        /* Store device id so we can use it during attach. */