]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/usb/musb/musb_gadget.c
USB: musb uses endpoint functions
[linux-2.6-omap-h63xx.git] / drivers / usb / musb / musb_gadget.c
index 6197daeab8f9e9cc9e09e4e4a31cc46ae4430e5e..4ea305387981655db2aca1858fe4c5fe6b9011a2 100644 (file)
@@ -874,10 +874,10 @@ static int musb_gadget_enable(struct usb_ep *ep,
                status = -EBUSY;
                goto fail;
        }
-       musb_ep->type = desc->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK;
+       musb_ep->type = usb_endpoint_type(desc);
 
        /* check direction and (later) maxpacket size against endpoint */
-       if ((desc->bEndpointAddress & USB_ENDPOINT_NUMBER_MASK) != epnum)
+       if (usb_endpoint_num(desc) != epnum)
                goto fail;
 
        /* REVISIT this rules out high bandwidth periodic transfers */
@@ -890,7 +890,7 @@ static int musb_gadget_enable(struct usb_ep *ep,
         * packet size (or fail), set the mode, clear the fifo
         */
        musb_ep_select(mbase, epnum);
-       if (desc->bEndpointAddress & USB_DIR_IN) {
+       if (usb_endpoint_dir_in(desc)) {
                u16 int_txe = musb_readw(mbase, MUSB_INTRTXE);
 
                if (hw_ep->is_shared_fifo)