aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/xhci-mem.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/host/xhci-mem.c')
-rw-r--r--drivers/usb/host/xhci-mem.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/drivers/usb/host/xhci-mem.c b/drivers/usb/host/xhci-mem.c
index c089668308ad..b1a8a5f4bbb8 100644
--- a/drivers/usb/host/xhci-mem.c
+++ b/drivers/usb/host/xhci-mem.c
@@ -1822,6 +1822,16 @@ void xhci_mem_cleanup(struct xhci_hcd *xhci)
1822 kfree(cur_cd); 1822 kfree(cur_cd);
1823 } 1823 }
1824 1824
1825 num_ports = HCS_MAX_PORTS(xhci->hcs_params1);
1826 for (i = 0; i < num_ports; i++) {
1827 struct xhci_interval_bw_table *bwt = &xhci->rh_bw[i].bw_table;
1828 for (j = 0; j < XHCI_MAX_INTERVAL; j++) {
1829 struct list_head *ep = &bwt->interval_bw[j].endpoints;
1830 while (!list_empty(ep))
1831 list_del_init(ep->next);
1832 }
1833 }
1834
1825 for (i = 1; i < MAX_HC_SLOTS; ++i) 1835 for (i = 1; i < MAX_HC_SLOTS; ++i)
1826 xhci_free_virt_device(xhci, i); 1836 xhci_free_virt_device(xhci, i);
1827 1837
@@ -1857,16 +1867,6 @@ void xhci_mem_cleanup(struct xhci_hcd *xhci)
1857 if (!xhci->rh_bw) 1867 if (!xhci->rh_bw)
1858 goto no_bw; 1868 goto no_bw;
1859 1869
1860 num_ports = HCS_MAX_PORTS(xhci->hcs_params1);
1861 for (i = 0; i < num_ports; i++) {
1862 struct xhci_interval_bw_table *bwt = &xhci->rh_bw[i].bw_table;
1863 for (j = 0; j < XHCI_MAX_INTERVAL; j++) {
1864 struct list_head *ep = &bwt->interval_bw[j].endpoints;
1865 while (!list_empty(ep))
1866 list_del_init(ep->next);
1867 }
1868 }
1869
1870 for (i = 0; i < num_ports; i++) { 1870 for (i = 0; i < num_ports; i++) {
1871 struct xhci_tt_bw_info *tt, *n; 1871 struct xhci_tt_bw_info *tt, *n;
1872 list_for_each_entry_safe(tt, n, &xhci->rh_bw[i].tts, tt_list) { 1872 list_for_each_entry_safe(tt, n, &xhci->rh_bw[i].tts, tt_list) {