aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/musb/musb_gadget.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/musb/musb_gadget.c')
-rw-r--r--drivers/usb/musb/musb_gadget.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/usb/musb/musb_gadget.c b/drivers/usb/musb/musb_gadget.c
index 6197daeab8f9..4ea305387981 100644
--- a/drivers/usb/musb/musb_gadget.c
+++ b/drivers/usb/musb/musb_gadget.c
@@ -874,10 +874,10 @@ static int musb_gadget_enable(struct usb_ep *ep,
874 status = -EBUSY; 874 status = -EBUSY;
875 goto fail; 875 goto fail;
876 } 876 }
877 musb_ep->type = desc->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK; 877 musb_ep->type = usb_endpoint_type(desc);
878 878
879 /* check direction and (later) maxpacket size against endpoint */ 879 /* check direction and (later) maxpacket size against endpoint */
880 if ((desc->bEndpointAddress & USB_ENDPOINT_NUMBER_MASK) != epnum) 880 if (usb_endpoint_num(desc) != epnum)
881 goto fail; 881 goto fail;
882 882
883 /* REVISIT this rules out high bandwidth periodic transfers */ 883 /* REVISIT this rules out high bandwidth periodic transfers */
@@ -890,7 +890,7 @@ static int musb_gadget_enable(struct usb_ep *ep,
890 * packet size (or fail), set the mode, clear the fifo 890 * packet size (or fail), set the mode, clear the fifo
891 */ 891 */
892 musb_ep_select(mbase, epnum); 892 musb_ep_select(mbase, epnum);
893 if (desc->bEndpointAddress & USB_DIR_IN) { 893 if (usb_endpoint_dir_in(desc)) {
894 u16 int_txe = musb_readw(mbase, MUSB_INTRTXE); 894 u16 int_txe = musb_readw(mbase, MUSB_INTRTXE);
895 895
896 if (hw_ep->is_shared_fifo) 896 if (hw_ep->is_shared_fifo)