diff options
author | Florian Fainelli <florian@openwrt.org> | 2012-10-08 09:11:26 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-10-22 14:23:59 -0400 |
commit | 2b16e39ee0a431d6cf6e6ca33bb08ec7dc82073f (patch) | |
tree | 72ed5f93dbf1eba3a07f62c0d08fb30d3094b497 /drivers/usb/host/ohci-platform.c | |
parent | f3a958d30dd1ceac83a3b82b5260475c7697d53a (diff) |
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>
Diffstat (limited to 'drivers/usb/host/ohci-platform.c')
-rw-r--r-- | drivers/usb/host/ohci-platform.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/usb/host/ohci-platform.c b/drivers/usb/host/ohci-platform.c index e24ec9f79164..1caaf657c5ea 100644 --- a/drivers/usb/host/ohci-platform.c +++ b/drivers/usb/host/ohci-platform.c | |||
@@ -31,6 +31,10 @@ static int ohci_platform_reset(struct usb_hcd *hcd) | |||
31 | ohci->flags |= OHCI_QUIRK_FRAME_NO; | 31 | ohci->flags |= OHCI_QUIRK_FRAME_NO; |
32 | 32 | ||
33 | ohci_hcd_init(ohci); | 33 | ohci_hcd_init(ohci); |
34 | |||
35 | if (pdata->num_ports) | ||
36 | ohci->num_ports = pdata->num_ports; | ||
37 | |||
34 | err = ohci_init(ohci); | 38 | err = ohci_init(ohci); |
35 | 39 | ||
36 | return err; | 40 | return err; |