USB: ohci: allow platform driver to specify the number of ports
This patch modifies the ohci platform driver to accept the num_ports parameter to be set via platform_data. Setting the number of ports must be done after the call to ohci_hcd_init(). Signed-off-by: Florian Fainelli <florian@openwrt.org> Acked-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:

committed by
Greg Kroah-Hartman

parent
f3a958d30d
commit
2b16e39ee0
@@ -31,6 +31,10 @@ static int ohci_platform_reset(struct usb_hcd *hcd)
|
||||
ohci->flags |= OHCI_QUIRK_FRAME_NO;
|
||||
|
||||
ohci_hcd_init(ohci);
|
||||
|
||||
if (pdata->num_ports)
|
||||
ohci->num_ports = pdata->num_ports;
|
||||
|
||||
err = ohci_init(ohci);
|
||||
|
||||
return err;
|
||||
|
Reference in New Issue
Block a user