usb: dwc3: gadget: move debugging print around
authorFelipe Balbi <balbi@ti.com>
Fri, 12 Jul 2013 16:09:39 +0000 (19:09 +0300)
committerFelipe Balbi <balbi@ti.com>
Mon, 29 Jul 2013 10:56:54 +0000 (13:56 +0300)
by moving that dev_vdbg() to the internal
__dwc3_gadget_ep_enable() we get the print
even when enable ep0, which calls the internal
function directly.

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

index c7be039d85512b3764565f3a6ce15a8751774116..c8d47c12ce33eb75900452c8be60cccc646ff0f0 100644 (file)
@@ -500,6 +500,8 @@ static int __dwc3_gadget_ep_enable(struct dwc3_ep *dep,
        u32                     reg;
        int                     ret = -ENOMEM;
 
+       dev_vdbg(dwc->dev, "Enabling %s\n", dep->name);
+
        if (!(dep->flags & DWC3_EP_ENABLED)) {
                ret = dwc3_gadget_start_config(dwc, dep);
                if (ret)
@@ -656,8 +658,6 @@ static int dwc3_gadget_ep_enable(struct usb_ep *ep,
                dev_err(dwc->dev, "invalid endpoint transfer type\n");
        }
 
-       dev_vdbg(dwc->dev, "Enabling %s\n", dep->name);
-
        spin_lock_irqsave(&dwc->lock, flags);
        ret = __dwc3_gadget_ep_enable(dep, desc, ep->comp_desc, false);
        spin_unlock_irqrestore(&dwc->lock, flags);