usb: don't use bNbrPorts after initialization
authorKrzysztof Mazur <krzysiek@podlesie.net>
Thu, 22 Aug 2013 12:49:40 +0000 (14:49 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 23 Aug 2013 17:47:17 +0000 (10:47 -0700)
commit3bbc47d8b07abad56780a8e214520259808c4f8b
tree6a7bf12ca876302c8ecf200c1ec1c9e476ebe3bf
parente58547eb9561a8a72d46e2d411090a614d33ac0e
usb: don't use bNbrPorts after initialization

After successful initialization hub->descriptor->bNbrPorts and
hub->hdev->maxchild are equal, but using hub->hdev->maxchild is
preferred because that value is explicitly used for initialization
of hub->ports[].

Signed-off-by: Krzysztof Mazur <krzysiek@podlesie.net>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/core/hub.c