aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/input/yealink.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/usb/input/yealink.c b/drivers/usb/input/yealink.c
index 0748281..e2dd274 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;