USB: OHCI: don't look at the root hub to get the number of ports
commitdd13b9f4a90b5dcefb7ef36393a55c96f3f10a76
authorAlan Stern <stern@rowland.harvard.edu>
Tue, 20 Apr 2010 14:37:57 +0000 (20 10:37 -0400)
committerGreg Kroah-Hartman <gregkh@suse.de>
Wed, 12 May 2010 21:57:02 +0000 (12 14:57 -0700)
tree9d8e155dc464dc1f5c94fdc42fa31ed2cd086a6d
parent0f6f37f1a93d1936d18e99739062f783118c9f98
USB: OHCI: don't look at the root hub to get the number of ports

commit fcf7d2141f4a363a4a8454c4a0f26bb69e766c5f upstream.

This patch (as1371) fixes a small bug in ohci-hcd.  The HCD already
knows how many ports the controller has; there's no need to go looking
at the root hub's usb_device structure to find out.  Especially since
the root hub's maxchild value is set correctly only while the root hub
is bound to the hub driver.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/host/ohci-hub.c