diff options
author | Felipe Balbi <felipe.balbi@linux.intel.com> | 2016-03-16 14:01:37 +0200 |
---|---|---|
committer | Felipe Balbi <felipe.balbi@linux.intel.com> | 2016-03-29 09:30:31 +0300 |
commit | e901aa159dac9988c9961c31c01730effe8f5c22 (patch) | |
tree | 94252f52246c7a87807b518702b967ccee711dc2 /drivers/usb | |
parent | ad14d4e0308afda06a60036020a15025571604af (diff) | |
download | linux-stable-e901aa159dac9988c9961c31c01730effe8f5c22.tar.gz linux-stable-e901aa159dac9988c9961c31c01730effe8f5c22.tar.bz2 linux-stable-e901aa159dac9988c9961c31c01730effe8f5c22.zip |
usb: dwc3: gadget: fix endpoint renaming
We were exitting the function before actually
renaming anything. While at that, also always leave
control endpoint un-renamed.
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Diffstat (limited to 'drivers/usb')
-rw-r--r-- | drivers/usb/dwc3/gadget.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c index 3d2c53e4ac92..d54a028cdfeb 100644 --- a/drivers/usb/dwc3/gadget.c +++ b/drivers/usb/dwc3/gadget.c @@ -568,7 +568,7 @@ static int __dwc3_gadget_ep_enable(struct dwc3_ep *dep, dwc3_writel(dwc->regs, DWC3_DALEPENA, reg); if (!usb_endpoint_xfer_isoc(desc)) - return 0; + goto out; /* Link TRB for ISOC. The HWO bit is never reset */ trb_st_hw = &dep->trb_pool[0]; @@ -582,9 +582,10 @@ static int __dwc3_gadget_ep_enable(struct dwc3_ep *dep, trb_link->ctrl |= DWC3_TRB_CTRL_HWO; } +out: switch (usb_endpoint_type(desc)) { case USB_ENDPOINT_XFER_CONTROL: - strlcat(dep->name, "-control", sizeof(dep->name)); + /* don't change name */ break; case USB_ENDPOINT_XFER_ISOC: strlcat(dep->name, "-isoc", sizeof(dep->name)); |