提交 d5ae36dd 编写于 作者: G Greg Kroah-Hartman

[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: NGreg Kroah-Hartman <gregkh@suse.de>
上级 aca951a2
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册