Skip to content

Commit

Permalink
USB: OHCI: don't look at the root hub to get the number of ports
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Alan Stern authored and Greg Kroah-Hartman committed Apr 30, 2010
1 parent 62f9cfa commit fcf7d21
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/usb/host/ohci-hub.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit fcf7d21

Please sign in to comment.