summaryrefslogtreecommitdiffstats
path: root/drivers/usb/dwc3/gadget.c
diff options
context:
space:
mode:
authorFelipe Balbi <felipe.balbi@linux.intel.com>2017-09-05 14:36:13 +0300
committerFelipe Balbi <felipe.balbi@linux.intel.com>2017-10-19 10:38:05 +0300
commit502a37b98a7bd45a198139e52671833469720c38 (patch)
tree0f9068402dd5ac16350f27f74200bdc8435c0a43 /drivers/usb/dwc3/gadget.c
parent64e01080299784692ff291099cd8a5ee72e66d98 (diff)
downloadop-kernel-dev-502a37b98a7bd45a198139e52671833469720c38.zip
op-kernel-dev-502a37b98a7bd45a198139e52671833469720c38.tar.gz
usb: dwc3: gadget: cache frame number in struct dwc3_ep
This is in preparation to simplifying prototype of __dwc3_gadget_kick_transfer(). Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Diffstat (limited to 'drivers/usb/dwc3/gadget.c')
-rw-r--r--drivers/usb/dwc3/gadget.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c
index 850fda0..2c0b9d0 100644
--- a/drivers/usb/dwc3/gadget.c
+++ b/drivers/usb/dwc3/gadget.c
@@ -1258,8 +1258,6 @@ static int __dwc3_gadget_get_frame(struct dwc3 *dwc)
static void __dwc3_gadget_start_isoc(struct dwc3 *dwc,
struct dwc3_ep *dep, u32 cur_uf)
{
- u32 uf;
-
if (list_empty(&dep->pending_list)) {
dev_info(dwc->dev, "%s: ran out of requests\n",
dep->name);
@@ -1271,9 +1269,8 @@ static void __dwc3_gadget_start_isoc(struct dwc3 *dwc,
* Schedule the first trb for one interval in the future or at
* least 4 microframes.
*/
- uf = cur_uf + max_t(u32, 4, dep->interval);
-
- __dwc3_gadget_kick_transfer(dep, uf);
+ dep->frame_number = cur_uf + max_t(u32, 4, dep->interval);
+ __dwc3_gadget_kick_transfer(dep, dep->frame_number);
}
static void dwc3_gadget_start_isoc(struct dwc3 *dwc,
OpenPOWER on IntegriCloud