summaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/xhci.c
diff options
context:
space:
mode:
authorMathias Nyman <mathias.nyman@linux.intel.com>2017-01-23 14:20:25 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-01-25 11:00:02 +0100
commit9ef7fbbb4fdfb857e606a9fd550faa8011cce5e2 (patch)
tree0180466c74a13b3dc0caeb79f9c557a8a1ef5377 /drivers/usb/host/xhci.c
parente6f7caa3de7a6a093e23d2722e45676a6e886e4c (diff)
downloadblackbird-op-linux-9ef7fbbb4fdfb857e606a9fd550faa8011cce5e2.tar.gz
blackbird-op-linux-9ef7fbbb4fdfb857e606a9fd550faa8011cce5e2.zip
xhci: Rename variables related to transfer descritpors
urb_priv structure has a count on how many TDs the URB contains, and how many of those TD's we have handled. rename: length -> num_tds td_cnt -> num_tds_done No functional changes Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/host/xhci.c')
-rw-r--r--drivers/usb/host/xhci.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c
index 40b1486e500a..bee6272b9bfd 100644
--- a/drivers/usb/host/xhci.c
+++ b/drivers/usb/host/xhci.c
@@ -1379,8 +1379,8 @@ int xhci_urb_enqueue(struct usb_hcd *hcd, struct urb *urb, gfp_t mem_flags)
buffer++;
}
- urb_priv->length = num_tds;
- urb_priv->td_cnt = 0;
+ urb_priv->num_tds = num_tds;
+ urb_priv->num_tds_done = 0;
urb->hcpriv = urb_priv;
trace_xhci_urb_enqueue(urb);
@@ -1523,8 +1523,8 @@ int xhci_urb_dequeue(struct usb_hcd *hcd, struct urb *urb, int status)
xhci_dbg_trace(xhci, trace_xhci_dbg_cancel_urb,
"HW died, freeing TD.");
urb_priv = urb->hcpriv;
- for (i = urb_priv->td_cnt;
- i < urb_priv->length && xhci->devs[urb->dev->slot_id];
+ for (i = urb_priv->num_tds_done;
+ i < urb_priv->num_tds && xhci->devs[urb->dev->slot_id];
i++) {
td = urb_priv->td[i];
if (!list_empty(&td->td_list))
@@ -1549,8 +1549,8 @@ int xhci_urb_dequeue(struct usb_hcd *hcd, struct urb *urb, int status)
}
urb_priv = urb->hcpriv;
- i = urb_priv->td_cnt;
- if (i < urb_priv->length)
+ i = urb_priv->num_tds_done;
+ if (i < urb_priv->num_tds)
xhci_dbg_trace(xhci, trace_xhci_dbg_cancel_urb,
"Cancel URB %p, dev %s, ep 0x%x, "
"starting at offset 0x%llx",
@@ -1560,7 +1560,7 @@ int xhci_urb_dequeue(struct usb_hcd *hcd, struct urb *urb, int status)
urb_priv->td[i]->start_seg,
urb_priv->td[i]->first_trb));
- for (; i < urb_priv->length; i++) {
+ for (; i < urb_priv->num_tds; i++) {
td = urb_priv->td[i];
list_add_tail(&td->cancelled_td_list, &ep->cancelled_td_list);
}
OpenPOWER on IntegriCloud