Skip to content

Commit

Permalink
[PATCH] USB: fix endian issues in yealink driver.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Greg Kroah-Hartman committed Sep 8, 2005
1 parent aca951a commit d5ae36d
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions drivers/usb/input/yealink.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit d5ae36d

Please sign in to comment.