Applied to for-usb-next-queue. I'll rebase it against Greg's usb-next branch once 3.13-rc1 is out, and send it off for inclusion for 3.14. Sarah Sharp On Mon, Aug 26, 2013 at 11:29:46PM +0300, Xenia Ragiadakou wrote: > 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@xxxxxxxxx> > --- > drivers/usb/host/xhci.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c > index ba0ec0a..787076e 100644 > --- a/drivers/usb/host/xhci.c > +++ b/drivers/usb/host/xhci.c > @@ -4574,7 +4574,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]; > > -- > 1.8.3.4 > > -- > To unsubscribe from this list: send the line "unsubscribe linux-usb" in > the body of a message to majordomo@xxxxxxxxxxxxxxx > More majordomo info at http://vger.kernel.org/majordomo-info.html -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html