mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-03-21 06:24:12 +00:00
[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 <gregkh@suse.de>
This commit is contained in:
parent
aca951a22a
commit
d5ae36dd43
1 changed files with 5 additions and 2 deletions
|
@ -840,9 +840,12 @@ static void usb_disconnect(struct usb_interface *intf)
|
||||||
static int usb_match(struct usb_device *udev)
|
static int usb_match(struct usb_device *udev)
|
||||||
{
|
{
|
||||||
int i;
|
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++) {
|
for (i = 0; i < ARRAY_SIZE(yld_device); i++) {
|
||||||
if ((udev->descriptor.idVendor == yld_device[i].idVendor) &&
|
if ((idVendor == yld_device[i].idVendor) &&
|
||||||
(udev->descriptor.idProduct == yld_device[i].idProduct))
|
(idProduct == yld_device[i].idProduct))
|
||||||
return i;
|
return i;
|
||||||
}
|
}
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
|
|
Loading…
Add table
Reference in a new issue