diff options
author | Felipe Balbi <felipe.balbi@linux.intel.com> | 2018-03-26 15:48:22 +0300 |
---|---|---|
committer | Felipe Balbi <felipe.balbi@linux.intel.com> | 2018-05-21 10:00:49 +0300 |
commit | 66f5dd5a03797bf52f8386e7ed7c67c4395126f6 (patch) | |
tree | b192a6a900de8c2e186cbd41c2145bcf26595335 /drivers/usb/dwc3 | |
parent | a861282f503731bc0cf7c3d08ca901e2a82daadc (diff) |
usb: dwc3: gadget: rename done_trbs and done_reqs
This patch simply renames two functions to more descriptive names so
that it's easier to understand what they're doing.
Cleanup only, no functional changes.
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Diffstat (limited to 'drivers/usb/dwc3')
-rw-r--r-- | drivers/usb/dwc3/gadget.c | 29 |
1 files changed, 16 insertions, 13 deletions
diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c index d016cedc9f9d..9afa84d645a3 100644 --- a/drivers/usb/dwc3/gadget.c +++ b/drivers/usb/dwc3/gadget.c @@ -2248,10 +2248,10 @@ static void dwc3_gadget_free_endpoints(struct dwc3 *dwc) /* -------------------------------------------------------------------------- */ -static int __dwc3_cleanup_done_trbs(struct dwc3 *dwc, struct dwc3_ep *dep, - struct dwc3_request *req, struct dwc3_trb *trb, - const struct dwc3_event_depevt *event, int status, - int chain) +static int dwc3_gadget_ep_reclaim_completed_trbs(struct dwc3 *dwc, + struct dwc3_ep *dep, struct dwc3_request *req, + struct dwc3_trb *trb, const struct dwc3_event_depevt *event, + int status, int chain) { unsigned int count; unsigned int s_pkt = 0; @@ -2336,8 +2336,9 @@ static int __dwc3_cleanup_done_trbs(struct dwc3 *dwc, struct dwc3_ep *dep, return 0; } -static int dwc3_cleanup_done_reqs(struct dwc3 *dwc, struct dwc3_ep *dep, - const struct dwc3_event_depevt *event, int status) +static int dwc3_gadget_ep_cleanup_completed_requests(struct dwc3 *dwc, + struct dwc3_ep *dep, const struct dwc3_event_depevt *event, + int status) { struct dwc3_request *req, *n; struct dwc3_trb *trb; @@ -2365,21 +2366,22 @@ static int dwc3_cleanup_done_reqs(struct dwc3 *dwc, struct dwc3_ep *dep, req->sg = sg_next(s); req->num_pending_sgs--; - ret = __dwc3_cleanup_done_trbs(dwc, dep, req, trb, - event, status, chain); + ret = dwc3_gadget_ep_reclaim_completed_trbs(dwc, + dep, req, trb, event, status, + chain); if (ret) break; } } else { trb = &dep->trb_pool[dep->trb_dequeue]; - ret = __dwc3_cleanup_done_trbs(dwc, dep, req, trb, - event, status, chain); + ret = dwc3_gadget_ep_reclaim_completed_trbs(dwc, dep, + req, trb, event, status, chain); } if (req->unaligned || req->zero) { trb = &dep->trb_pool[dep->trb_dequeue]; - ret = __dwc3_cleanup_done_trbs(dwc, dep, req, trb, - event, status, false); + ret = dwc3_gadget_ep_reclaim_completed_trbs(dwc, dep, + req, trb, event, status, false); req->unaligned = false; req->zero = false; } @@ -2450,7 +2452,8 @@ static void dwc3_gadget_endpoint_transfer_in_progress(struct dwc3 *dwc, if (event->status & DEPEVT_STATUS_BUSERR) status = -ECONNRESET; - clean_busy = dwc3_cleanup_done_reqs(dwc, dep, event, status); + clean_busy = dwc3_gadget_ep_cleanup_completed_requests(dwc, dep, event, + status); if (clean_busy && (!dep->endpoint.desc || usb_endpoint_xfer_isoc(dep->endpoint.desc))) dep->flags &= ~DWC3_EP_BUSY; |