aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/xhci-mem.c
diff options
context:
space:
mode:
authorSarah Sharp <sarah.a.sharp@linux.intel.com>2010-12-15 15:47:14 -0500
committerSarah Sharp <sarah.a.sharp@linux.intel.com>2011-03-13 21:23:36 -0400
commit20b67cf51fa606442bb343afad0ee1a393a6afb3 (patch)
tree1d85e8b93aff185211d065a5113beaeb68cfcb26 /drivers/usb/host/xhci-mem.c
parent5308a91b9fc1a8f94b860c2589b06908a97cba7e (diff)
xhci: Refactor bus suspend state into a struct.
There are several variables in the xhci_hcd structure that are related to bus suspend and resume state. There are a couple different port status arrays that are accessed by port index. Move those variables into a separate structure, xhci_bus_state. Stash that structure in xhci_hcd. When we have two roothhubs that can be suspended and resumed separately, we can have two xhci_bus_states, and index into the port arrays in each structure with the fake roothub port index (not the real hardware port index). Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Diffstat (limited to 'drivers/usb/host/xhci-mem.c')
-rw-r--r--drivers/usb/host/xhci-mem.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/usb/host/xhci-mem.c b/drivers/usb/host/xhci-mem.c
index 9688a58611d4..bc809cbd570a 100644
--- a/drivers/usb/host/xhci-mem.c
+++ b/drivers/usb/host/xhci-mem.c
@@ -1451,7 +1451,7 @@ void xhci_mem_cleanup(struct xhci_hcd *xhci)
1451 1451
1452 xhci->page_size = 0; 1452 xhci->page_size = 0;
1453 xhci->page_shift = 0; 1453 xhci->page_shift = 0;
1454 xhci->bus_suspended = 0; 1454 xhci->bus_state[0].bus_suspended = 0;
1455} 1455}
1456 1456
1457static int xhci_test_trb_in_td(struct xhci_hcd *xhci, 1457static int xhci_test_trb_in_td(struct xhci_hcd *xhci,
@@ -1971,7 +1971,7 @@ int xhci_mem_init(struct xhci_hcd *xhci, gfp_t flags)
1971 for (i = 0; i < MAX_HC_SLOTS; ++i) 1971 for (i = 0; i < MAX_HC_SLOTS; ++i)
1972 xhci->devs[i] = NULL; 1972 xhci->devs[i] = NULL;
1973 for (i = 0; i < USB_MAXCHILDREN; ++i) 1973 for (i = 0; i < USB_MAXCHILDREN; ++i)
1974 xhci->resume_done[i] = 0; 1974 xhci->bus_state[0].resume_done[i] = 0;
1975 1975
1976 if (scratchpad_alloc(xhci, flags)) 1976 if (scratchpad_alloc(xhci, flags))
1977 goto fail; 1977 goto fail;