diff options
Diffstat (limited to 'drivers/usb/input')
-rw-r--r-- | drivers/usb/input/yealink.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/usb/input/yealink.c b/drivers/usb/input/yealink.c index 0748281b8f3e..e2dd274c6134 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) | |||
840 | static int usb_match(struct usb_device *udev) | 840 | static int usb_match(struct usb_device *udev) |
841 | { | 841 | { |
842 | int i; | 842 | int i; |
843 | u16 idVendor = le16_to_cpu(udev->descriptor.idVendor); | ||
844 | u16 idProduct = le16_to_cpu(udev->descriptor.idProduct); | ||
845 | |||
843 | for (i = 0; i < ARRAY_SIZE(yld_device); i++) { | 846 | for (i = 0; i < ARRAY_SIZE(yld_device); i++) { |
844 | if ((udev->descriptor.idVendor == yld_device[i].idVendor) && | 847 | if ((idVendor == yld_device[i].idVendor) && |
845 | (udev->descriptor.idProduct == yld_device[i].idProduct)) | 848 | (idProduct == yld_device[i].idProduct)) |
846 | return i; | 849 | return i; |
847 | } | 850 | } |
848 | return -ENODEV; | 851 | return -ENODEV; |