From 6f7cd44162ca1bffd54f4090e67b9810bacb5d25 Mon Sep 17 00:00:00 2001 From: "Luiz Fernando N. Capitulino" Date: Thu, 26 Oct 2006 13:03:04 -0300 Subject: [PATCH] USB: yealink: Use usb_endpoint_* functions Signed-off-by: Luiz Fernando N. Capitulino Signed-off-by: Greg Kroah-Hartman --- drivers/usb/input/yealink.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/usb/input/yealink.c b/drivers/usb/input/yealink.c index 905bf63..2268ca3 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) 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) -- 2.7.4