]> Pileus Git - ~andy/linux/commitdiff
usb: gadget: epautoconf: switch over to usb_endpoint_type()
authorFelipe Balbi <balbi@ti.com>
Fri, 8 Nov 2013 18:39:29 +0000 (12:39 -0600)
committerFelipe Balbi <balbi@ti.com>
Tue, 26 Nov 2013 16:58:16 +0000 (10:58 -0600)
we have a helper to fetch endpoint type out of
a descriptor, let's use it.

Signed-off-by: Felipe Balbi <balbi@ti.com>
drivers/usb/gadget/epautoconf.c

index a777f7bd11b46971c30d7aaef32080e5c7139e6f..feaaa7b72ee39fb7781d599e5b2cf7ea0b590939 100644 (file)
@@ -58,7 +58,7 @@ ep_matches (
                return 0;
 
        /* only support ep0 for portable CONTROL traffic */
-       type = desc->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK;
+       type = usb_endpoint_type(desc);
        if (USB_ENDPOINT_XFER_CONTROL == type)
                return 0;