summaryrefslogtreecommitdiffstats
path: root/drivers/usb
diff options
context:
space:
mode:
authorAlan Stern <stern@rowland.harvard.edu>2010-04-20 10:37:57 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2010-04-30 09:25:10 -0700
commitfcf7d2141f4a363a4a8454c4a0f26bb69e766c5f (patch)
tree53a72787cba660277e072f094ce4447c335b37e9 /drivers/usb
parent62f9cfa3ece58268b3e92ca59c23b175f86205aa (diff)
downloadop-kernel-dev-fcf7d2141f4a363a4a8454c4a0f26bb69e766c5f.zip
op-kernel-dev-fcf7d2141f4a363a4a8454c4a0f26bb69e766c5f.tar.gz
USB: OHCI: don't look at the root hub to get the number of ports
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> Cc: stable <stable@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/host/ohci-hub.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/host/ohci-hub.c b/drivers/usb/host/ohci-hub.c
index 32bbce9..65cac8c 100644
--- a/drivers/usb/host/ohci-hub.c
+++ b/drivers/usb/host/ohci-hub.c
@@ -697,7 +697,7 @@ static int ohci_hub_control (
u16 wLength
) {
struct ohci_hcd *ohci = hcd_to_ohci (hcd);
- int ports = hcd_to_bus (hcd)->root_hub->maxchild;
+ int ports = ohci->num_ports;
u32 temp;
int retval = 0;
OpenPOWER on IntegriCloud