Staging: ft1000: ft1000-usb: Use USB API functions rather than constants
authorShraddha Barke <shraddha.6596@gmail.com>
Sat, 12 Sep 2015 09:34:35 +0000 (15:04 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 14 Sep 2015 15:50:43 +0000 (08:50 -0700)
Introduce the use of the function usb_endpoint_is_bulk_in().

Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/ft1000/ft1000-usb/ft1000_usb.c

index fd255c62083f7029ed4ab667c7d5e9241547a7c1..d1ba0b827a552b56ea663dafa566d4cbc009c3f0 100644 (file)
@@ -111,17 +111,13 @@ static int ft1000_probe(struct usb_interface *interface,
                pr_debug("endpoint %d\n", i);
                pr_debug("bEndpointAddress=%x, bmAttributes=%x\n",
                         endpoint->bEndpointAddress, endpoint->bmAttributes);
-               if ((endpoint->bEndpointAddress & USB_DIR_IN)
-                   && ((endpoint->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) ==
-                       USB_ENDPOINT_XFER_BULK)) {
+               if (usb_endpoint_is_bulk_in(endpoint)) {
                        ft1000dev->bulk_in_endpointAddr =
                                endpoint->bEndpointAddress;
                        pr_debug("in: %d\n", endpoint->bEndpointAddress);
                }
 
-               if (!(endpoint->bEndpointAddress & USB_DIR_IN)
-                   && ((endpoint->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) ==
-                       USB_ENDPOINT_XFER_BULK)) {
+               if (usb_endpoint_is_bulk_in(endpoint)) {
                        ft1000dev->bulk_out_endpointAddr =
                                endpoint->bEndpointAddress;
                        pr_debug("out: %d\n", endpoint->bEndpointAddress);