usb: gadget: mv_udc: set unused endpoint with right type
authorNeil Zhang <zhangwm@marvell.com>
Wed, 12 Oct 2011 08:49:32 +0000 (16:49 +0800)
committerFelipe Balbi <balbi@ti.com>
Thu, 13 Oct 2011 17:42:04 +0000 (20:42 +0300)
According to the comment right above the code, we should use
USB_ENDPOINT_XFER_BULK instead.

Signed-off-by: Neil Zhang <zhangwm@marvell.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
drivers/usb/gadget/mv_udc_core.c

index 501b05a..16bfcb9 100644 (file)
@@ -590,14 +590,14 @@ static int mv_ep_enable(struct usb_ep *_ep,
         */
        epctrlx = readl(&udc->op_regs->epctrlx[ep->ep_num]);
        if ((epctrlx & EPCTRL_RX_ENABLE) == 0) {
-               epctrlx |= ((desc->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK)
+               epctrlx |= (USB_ENDPOINT_XFER_BULK
                                << EPCTRL_RX_EP_TYPE_SHIFT);
                writel(epctrlx, &udc->op_regs->epctrlx[ep->ep_num]);
        }
 
        epctrlx = readl(&udc->op_regs->epctrlx[ep->ep_num]);
        if ((epctrlx & EPCTRL_TX_ENABLE) == 0) {
-               epctrlx |= ((desc->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK)
+               epctrlx |= (USB_ENDPOINT_XFER_BULK
                                << EPCTRL_TX_EP_TYPE_SHIFT);
                writel(epctrlx, &udc->op_regs->epctrlx[ep->ep_num]);
        }