[PATCH] USB: fix endian issues in yealink driver.
authorGreg Kroah-Hartman <gregkh@suse.de>
Tue, 16 Aug 2005 19:33:30 +0000 (12:33 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 8 Sep 2005 23:40:57 +0000 (16:40 -0700)
sparse still complains about the htons usage, but I'll leave that for
others to fix.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/input/yealink.c

index 0748281b8f3ef259e6bac38e9dfa1fdf3a65510a..e2dd274c6134591870db5203cd2285f8ae3b82e0 100644 (file)
@@ -840,9 +840,12 @@ static void usb_disconnect(struct usb_interface *intf)
 static int usb_match(struct usb_device *udev)
 {
        int i;
+       u16 idVendor = le16_to_cpu(udev->descriptor.idVendor);
+       u16 idProduct = le16_to_cpu(udev->descriptor.idProduct);
+
        for (i = 0; i < ARRAY_SIZE(yld_device); i++) {
-               if ((udev->descriptor.idVendor == yld_device[i].idVendor) &&
-                   (udev->descriptor.idProduct == yld_device[i].idProduct))
+               if ((idVendor == yld_device[i].idVendor) &&
+                   (idProduct == yld_device[i].idProduct))
                        return i;
        }
        return -ENODEV;