diff options
author | Felipe Balbi <felipe.balbi@linux.intel.com> | 2018-03-29 15:30:44 +0300 |
---|---|---|
committer | Felipe Balbi <felipe.balbi@linux.intel.com> | 2018-05-21 10:00:55 +0300 |
commit | 8b3b7b66c0e63813f611f7f70a6c4e7efafedae8 (patch) | |
tree | e4c0c58f927aad9e03ef60b61624ca806cdfc635 /drivers/usb/dwc3 | |
parent | cf35fc336e668fcac6dc981eac9f7646859ba601 (diff) | |
download | linux-8b3b7b66c0e63813f611f7f70a6c4e7efafedae8.tar.xz |
usb: dwc3: gadget: simplify unaligned and zlp handling
We can just call reclaim_trb_linear instead of reimplementing it.
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Diffstat (limited to 'drivers/usb/dwc3')
-rw-r--r-- | drivers/usb/dwc3/gadget.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c index baf89134604a..7fa8b15021e8 100644 --- a/drivers/usb/dwc3/gadget.c +++ b/drivers/usb/dwc3/gadget.c @@ -2314,7 +2314,6 @@ static void dwc3_gadget_ep_cleanup_completed_requests(struct dwc3_ep *dep, const struct dwc3_event_depevt *event, int status) { struct dwc3_request *req, *n; - struct dwc3_trb *trb; int ret = 0; list_for_each_entry_safe(req, n, &dep->started_list, list) { @@ -2329,9 +2328,8 @@ static void dwc3_gadget_ep_cleanup_completed_requests(struct dwc3_ep *dep, status); if (req->unaligned || req->zero) { - trb = &dep->trb_pool[dep->trb_dequeue]; - ret = dwc3_gadget_ep_reclaim_completed_trb(dep, req, - trb, event, status, false); + ret = dwc3_gadget_ep_reclaim_trb_linear(dep, req, event, + status); req->unaligned = false; req->zero = false; } |