diff options
author | Thinh Nguyen <Thinh.Nguyen@synopsys.com> | 2020-09-24 11:22:14 +0300 |
---|---|---|
committer | Felipe Balbi <balbi@kernel.org> | 2020-10-02 09:57:45 +0300 |
commit | 7f2958d9ad58a41df81a7c1e28dd5ddeeec58890 (patch) | |
tree | c51d5e4204f57d4c8c14f6b032df90a5bd87614c /drivers/usb | |
parent | cb1b3997b636f65cee70e03c86627be521272c5d (diff) | |
download | linux-7f2958d9ad58a41df81a7c1e28dd5ddeeec58890.tar.xz |
usb: dwc3: gadget: Rename misleading function names
The functions dwc3_prepare_one_trb_sg and dwc3_prepare_one_trb_linear
are not necessarily preparing "one" TRB, it can prepare multiple TRBs.
Rename these functions as follow:
dwc3_prepare_one_trb_sg -> dwc3_prepare_trbs_sg
dwc3_prepare_one_trb_linear -> dwc3_prepare_trbs_linear
Signed-off-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
Signed-off-by: Felipe Balbi <balbi@kernel.org>
Diffstat (limited to 'drivers/usb')
-rw-r--r-- | drivers/usb/dwc3/gadget.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c index f75ce10407dd..82bc075ba97c 100644 --- a/drivers/usb/dwc3/gadget.c +++ b/drivers/usb/dwc3/gadget.c @@ -1135,7 +1135,7 @@ static int dwc3_prepare_last_sg(struct dwc3_ep *dep, return num_trbs; } -static int dwc3_prepare_one_trb_sg(struct dwc3_ep *dep, +static int dwc3_prepare_trbs_sg(struct dwc3_ep *dep, struct dwc3_request *req) { struct scatterlist *sg = req->start_sg; @@ -1231,7 +1231,7 @@ out: return req->num_trbs - num_trbs; } -static int dwc3_prepare_one_trb_linear(struct dwc3_ep *dep, +static int dwc3_prepare_trbs_linear(struct dwc3_ep *dep, struct dwc3_request *req) { return dwc3_prepare_last_sg(dep, req, req->request.length, 0); @@ -1266,7 +1266,7 @@ static int dwc3_prepare_trbs(struct dwc3_ep *dep) */ list_for_each_entry(req, &dep->started_list, list) { if (req->num_pending_sgs > 0) { - ret = dwc3_prepare_one_trb_sg(dep, req); + ret = dwc3_prepare_trbs_sg(dep, req); if (!ret) return ret; } @@ -1297,9 +1297,9 @@ static int dwc3_prepare_trbs(struct dwc3_ep *dep) req->num_pending_sgs = req->request.num_mapped_sgs; if (req->num_pending_sgs > 0) - ret = dwc3_prepare_one_trb_sg(dep, req); + ret = dwc3_prepare_trbs_sg(dep, req); else - ret = dwc3_prepare_one_trb_linear(dep, req); + ret = dwc3_prepare_trbs_linear(dep, req); if (!ret || !dwc3_calc_trbs_left(dep)) return ret; |