This can simply be done inline in xhci_queue_isoc_tx().
Signed-off-by: Dan Williams <[email protected]>
---
drivers/usb/host/xhci-ring.c | 6 +++---
drivers/usb/host/xhci.h | 1 -
2 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c
index ed167f17b2d2..27d271e26445 100644
--- a/drivers/usb/host/xhci-ring.c
+++ b/drivers/usb/host/xhci-ring.c
@@ -3672,6 +3672,7 @@ static int xhci_queue_isoc_tx(struct xhci_hcd *xhci,
gfp_t mem_flags,
struct xhci_ring_pointer rp;
u64 start_addr, addr;
int i, j;
+ unsigned int num_trbs_free_save;
bool more_trbs_coming;
ep_ring = xhci->devs[slot_id]->eps[ep_index].ring;
@@ -3687,6 +3688,7 @@ static int xhci_queue_isoc_tx(struct xhci_hcd *xhci,
gfp_t mem_flags,
start_cycle = ep_ring->cycle_state;
urb_priv = urb->hcpriv;
+ num_trbs_free_save = ep_ring->num_trbs_free;
/* Queue the first TRB, even if it's zero-length */
for (i = 0; i < num_tds; i++) {
unsigned int total_packet_count;
@@ -3834,7 +3836,7 @@ cleanup:
rp.ptr = urb_priv->td[0]->first_trb;
xhci_ring_set_enqueue(ep_ring, &rp);
ep_ring->cycle_state = start_cycle;
- ep_ring->num_trbs_free = ep_ring->num_trbs_free_temp;
+ ep_ring->num_trbs_free = num_trbs_free_save;
usb_hcd_unlink_urb_from_ep(bus_to_hcd(urb->dev->bus), urb);
return ret;
}
@@ -3903,8 +3905,6 @@ int xhci_queue_isoc_tx_prepare(struct xhci_hcd *xhci,
gfp_t mem_flags,
urb->dev->speed == USB_SPEED_FULL)
urb->interval /= 8;
}
- ep_ring->num_trbs_free_temp = ep_ring->num_trbs_free;
-
return xhci_queue_isoc_tx(xhci, mem_flags, urb, slot_id, ep_index);
}
diff --git a/drivers/usb/host/xhci.h b/drivers/usb/host/xhci.h
index c38b10b96898..94c5d74e35b8 100644
--- a/drivers/usb/host/xhci.h
+++ b/drivers/usb/host/xhci.h
@@ -1350,7 +1350,6 @@ struct xhci_ring {
unsigned int stream_id;
unsigned int order;
unsigned int num_trbs_free;
- unsigned int num_trbs_free_temp;
bool last_td_was_short;
bool is_command;
bool is_stream;
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html