diff options
Diffstat (limited to 'drivers/usb/mtu3/mtu3_gadget.c')
-rw-r--r-- | drivers/usb/mtu3/mtu3_gadget.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/usb/mtu3/mtu3_gadget.c b/drivers/usb/mtu3/mtu3_gadget.c index ef9fcd5dc869..73a85369eb95 100644 --- a/drivers/usb/mtu3/mtu3_gadget.c +++ b/drivers/usb/mtu3/mtu3_gadget.c @@ -190,8 +190,7 @@ static int mtu3_gadget_ep_enable(struct usb_ep *ep, if (ret) goto error; - mep->wedged = 0; - mep->flags |= MTU3_EP_ENABLED; + mep->flags = MTU3_EP_ENABLED; mtu->active_ep++; error: @@ -219,7 +218,7 @@ static int mtu3_gadget_ep_disable(struct usb_ep *ep) spin_lock_irqsave(&mtu->lock, flags); mtu3_ep_disable(mep); - mep->flags &= ~MTU3_EP_ENABLED; + mep->flags = 0; mtu->active_ep--; spin_unlock_irqrestore(&(mtu->lock), flags); @@ -389,7 +388,7 @@ static int mtu3_gadget_ep_set_halt(struct usb_ep *ep, int value) goto done; } } else { - mep->wedged = 0; + mep->flags &= ~MTU3_EP_WEDGE; } dev_dbg(mtu->dev, "%s %s stall\n", ep->name, value ? "set" : "clear"); @@ -408,7 +407,7 @@ static int mtu3_gadget_ep_set_wedge(struct usb_ep *ep) { struct mtu3_ep *mep = to_mtu3_ep(ep); - mep->wedged = 1; + mep->flags |= MTU3_EP_WEDGE; return usb_ep_set_halt(ep); } |