summaryrefslogtreecommitdiffstats
path: root/drivers/usb/dwc3/gadget.c
diff options
context:
space:
mode:
authorFelipe Balbi <balbi@ti.com>2013-07-12 18:09:39 +0200
committerFelipe Balbi <balbi@ti.com>2013-07-29 12:56:54 +0200
commitff62d6b6727360ae73382213bc1ebac6cf5160d7 (patch)
tree7c3505f944329f03f38964cdd0a899dd41d03e83 /drivers/usb/dwc3/gadget.c
parentusb: dwc3: core: switch over to devm_ioremap_resource() (diff)
downloadlinux-ff62d6b6727360ae73382213bc1ebac6cf5160d7.tar.xz
linux-ff62d6b6727360ae73382213bc1ebac6cf5160d7.zip
usb: dwc3: gadget: move debugging print around
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>
Diffstat (limited to 'drivers/usb/dwc3/gadget.c')
-rw-r--r--drivers/usb/dwc3/gadget.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c
index c7be039d8551..c8d47c12ce33 100644
--- a/drivers/usb/dwc3/gadget.c
+++ b/drivers/usb/dwc3/gadget.c
@@ -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);