From: Greg Kroah-Hartman Date: Tue, 16 Aug 2005 19:33:30 +0000 (-0700) Subject: [PATCH] USB: fix endian issues in yealink driver. X-Git-Tag: v2.6.14-rc1~492^2~18^2~1 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=d5ae36dd439549305f00a755556f49c9fa7bb237;p=linux-2.6-omap-h63xx.git [PATCH] USB: fix endian issues in yealink driver. sparse still complains about the htons usage, but I'll leave that for others to fix. Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/usb/input/yealink.c b/drivers/usb/input/yealink.c index 0748281b8f3..e2dd274c613 100644 --- a/drivers/usb/input/yealink.c +++ b/drivers/usb/input/yealink.c @@ -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;