diff options
Diffstat (limited to 'drivers/usb/input/yealink.c')
-rw-r--r-- | drivers/usb/input/yealink.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/usb/input/yealink.c b/drivers/usb/input/yealink.c index 905bf6398257..2268ca311ade 100644 --- a/drivers/usb/input/yealink.c +++ b/drivers/usb/input/yealink.c | |||
@@ -859,10 +859,8 @@ static int usb_probe(struct usb_interface *intf, const struct usb_device_id *id) | |||
859 | 859 | ||
860 | interface = intf->cur_altsetting; | 860 | interface = intf->cur_altsetting; |
861 | endpoint = &interface->endpoint[0].desc; | 861 | endpoint = &interface->endpoint[0].desc; |
862 | if (!(endpoint->bEndpointAddress & USB_DIR_IN)) | 862 | if (!usb_endpoint_is_int_in(endpoint)) |
863 | return -EIO; | 863 | return -ENODEV; |
864 | if ((endpoint->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) != USB_ENDPOINT_XFER_INT) | ||
865 | return -EIO; | ||
866 | 864 | ||
867 | yld = kzalloc(sizeof(struct yealink_dev), GFP_KERNEL); | 865 | yld = kzalloc(sizeof(struct yealink_dev), GFP_KERNEL); |
868 | if (!yld) | 866 | if (!yld) |