提交 fcf7d214 编写于 作者: A Alan Stern 提交者: Greg Kroah-Hartman

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: NAlan Stern <stern@rowland.harvard.edu>
Cc: stable <stable@kernel.org>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 62f9cfa3
...@@ -697,7 +697,7 @@ static int ohci_hub_control ( ...@@ -697,7 +697,7 @@ static int ohci_hub_control (
u16 wLength u16 wLength
) { ) {
struct ohci_hcd *ohci = hcd_to_ohci (hcd); struct ohci_hcd *ohci = hcd_to_ohci (hcd);
int ports = hcd_to_bus (hcd)->root_hub->maxchild; int ports = ohci->num_ports;
u32 temp; u32 temp;
int retval = 0; int retval = 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册