diff options
author | Felipe Balbi <felipe.balbi@linux.intel.com> | 2018-05-07 15:19:31 +0300 |
---|---|---|
committer | Felipe Balbi <felipe.balbi@linux.intel.com> | 2018-05-21 10:01:01 +0300 |
commit | 31a2f5a7e13633712a97721458f6c5980c2d386e (patch) | |
tree | f3cbd58bebfafb9a4816eef0f37108a98b3e997e /drivers/usb | |
parent | d7ca7e1896b27eaca936ff8ff3abdd2492b55a34 (diff) | |
download | linux-31a2f5a7e13633712a97721458f6c5980c2d386e.tar.xz |
usb: dwc3: gadget: init req->{direction,epnum} from alloc_request()
We dont' need to touch req->direction or req->epnum from
ep_queue(). It's enough that we initialize both fields from
alloc_request() and just keep them for the entire lifetime of the
request.
No functional changes.
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Diffstat (limited to 'drivers/usb')
-rw-r--r-- | drivers/usb/dwc3/gadget.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c index cca692e0bfd8..4ca593cff15e 100644 --- a/drivers/usb/dwc3/gadget.c +++ b/drivers/usb/dwc3/gadget.c @@ -837,6 +837,7 @@ static struct usb_request *dwc3_gadget_ep_alloc_request(struct usb_ep *ep, if (!req) return NULL; + req->direction = dep->direction; req->epnum = dep->number; req->dep = dep; @@ -1285,8 +1286,6 @@ static int __dwc3_gadget_ep_queue(struct dwc3_ep *dep, struct dwc3_request *req) req->request.actual = 0; req->request.status = -EINPROGRESS; - req->direction = dep->direction; - req->epnum = dep->number; trace_dwc3_ep_queue(req); |