aboutsummaryrefslogtreecommitdiff
path: root/drivers/usb/host/xhci.c
diff options
context:
space:
mode:
authorXenia Ragiadakou <burzalodowa@gmail.com>2013-08-26 23:29:46 +0300
committerSarah Sharp <sarah.a.sharp@linux.intel.com>2013-12-02 12:59:46 -0800
commit64ba419b7a5acf5fc934bfad9cc46c7f17ab8026 (patch)
tree1c5e9fa457ae1f9d17f373b56717051c30560785 /drivers/usb/host/xhci.c
parent0c052aabe66c495bf1248f301a8e745da66c6633 (diff)
xhci: replace USB_MAXINTERFACES with config->desc.bNumInterface
This patch replaces USB_MAXINTERFACES with config->desc.bNumInterface in the termination condition for the loop that updates the LPM timeout of the endpoints on the cofiguration's interfaces, in xhci_calculate_lpm_timeout(), to avoid unnecessary loop cycles since most configurations come with 1-2 interfaces while USB_MAXINTERFACES is 32. Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com> Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Diffstat (limited to 'drivers/usb/host/xhci.c')
-rw-r--r--drivers/usb/host/xhci.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c
index a96b35cf4fa7..1798c5353102 100644
--- a/drivers/usb/host/xhci.c
+++ b/drivers/usb/host/xhci.c
@@ -4455,7 +4455,7 @@ static u16 xhci_calculate_lpm_timeout(struct usb_hcd *hcd,
if (!config)
return timeout;
- for (i = 0; i < USB_MAXINTERFACES; i++) {
+ for (i = 0; i < config->desc.bNumInterfaces; i++) {
struct usb_driver *driver;
struct usb_interface *intf = config->interface[i];