]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit213a50871eb7436751f14356cf4bdef249b92be2
tree6a7bf12ca876302c8ecf200c1ec1c9e476ebe3bf
parent926cdbfa9052806a727bdd46e0d61ed7412276c6
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