]> err.no Git - linux-2.6/commitdiff
USB: kobil_sct: Use usb_endpoint_* functions
authorLuiz Fernando N. Capitulino <lcapitulino@mandriva.com.br>
Thu, 26 Oct 2006 16:02:53 +0000 (13:02 -0300)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 1 Dec 2006 22:23:28 +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/serial/kobil_sct.c

index ff03331e0bcf0d97241d468856b3531f6caa5c6c..8dd2afa2fca843d02bca7cb92fe3567934a592e6 100644 (file)
@@ -185,13 +185,11 @@ static int kobil_startup (struct usb_serial *serial)
   
        for (i = 0; i < altsetting->desc.bNumEndpoints; i++) {
                endpoint = &altsetting->endpoint[i];
-               if (((endpoint->desc.bEndpointAddress & USB_ENDPOINT_DIR_MASK) == USB_DIR_OUT) && 
-                   ((endpoint->desc.bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) == USB_ENDPOINT_XFER_INT)) {
+               if (usb_endpoint_is_int_out(&endpoint->desc)) {
                        dbg("%s Found interrupt out endpoint. Address: %d", __FUNCTION__, endpoint->desc.bEndpointAddress);
                        priv->write_int_endpoint_address = endpoint->desc.bEndpointAddress;
                }
-               if (((endpoint->desc.bEndpointAddress & USB_ENDPOINT_DIR_MASK) == USB_DIR_IN) && 
-                   ((endpoint->desc.bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) == USB_ENDPOINT_XFER_INT)) {
+               if (usb_endpoint_is_int_in(&endpoint->desc)) {
                        dbg("%s Found interrupt in  endpoint. Address: %d", __FUNCTION__, endpoint->desc.bEndpointAddress);
                        priv->read_int_endpoint_address = endpoint->desc.bEndpointAddress;
                }