xhci: Rename variables and reduce register reads.
authorSarah Sharp <sarah.a.sharp@linux.intel.com>
Wed, 15 Dec 2010 19:56:29 +0000 (11:56 -0800)
committerSarah Sharp <sarah.a.sharp@linux.intel.com>
Mon, 14 Mar 2011 01:07:08 +0000 (18:07 -0700)
commit518e848ea8e2932ce18ce2daef8ad5f55a145f27
tree623b2a258580f6fd28584d83c276c133ed423a15
parent1d5810b6923c76fc95e52d9d3491c91824c2f075
xhci: Rename variables and reduce register reads.

The xhci_bus_suspend() and xhci_bus_resume() functions are a bit hard to
read, because they have an ambiguously named variable "port".  Rename it
to "port_index".  Introduce a new temporary variable, "max_ports" that
holds the maximum number of roothub ports the host controller supports.
This will reduce the number of register reads, and make it easy to change
the maximum number of ports when there are two roothubs.

Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
drivers/usb/host/xhci-hub.c
drivers/usb/host/xhci-ring.c