USB: yealink: Use usb_endpoint_* functions
authorLuiz Fernando N. Capitulino <lcapitulino@mandriva.com.br>
Thu, 26 Oct 2006 16:03:04 +0000 (13:03 -0300)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 1 Dec 2006 22:23:29 +0000 (14:23 -0800)
Signed-off-by: Luiz Fernando N. Capitulino <lcapitulino@mandriva.com.br>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/input/yealink.c

index 905bf63..2268ca3 100644 (file)
@@ -859,10 +859,8 @@ static int usb_probe(struct usb_interface *intf, const struct usb_device_id *id)
 
        interface = intf->cur_altsetting;
        endpoint = &interface->endpoint[0].desc;
-       if (!(endpoint->bEndpointAddress & USB_DIR_IN))
-               return -EIO;
-       if ((endpoint->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) != USB_ENDPOINT_XFER_INT)
-               return -EIO;
+       if (!usb_endpoint_is_int_in(endpoint))
+               return -ENODEV;
 
        yld = kzalloc(sizeof(struct yealink_dev), GFP_KERNEL);
        if (!yld)