summaryrefslogtreecommitdiff
path: root/drivers/usb/host/ohci-sa1111.c
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@arm.linux.org.uk>2012-01-26 15:45:27 +0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2012-03-24 15:30:14 +0400
commit81e6ca3eb74d6bdbab181dd2db378f49f76f0d97 (patch)
tree13e0d411de7743e14c0ffc3a81357c96be5be554 /drivers/usb/host/ohci-sa1111.c
parent846a70487e2a0e5045c6a428a0969d3e0490b359 (diff)
downloadlinux-81e6ca3eb74d6bdbab181dd2db378f49f76f0d97.tar.xz
USB: sa1111: add hcd .reset method
Add the .reset method to the HCD, and update the .start method accordingly for this change. Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'drivers/usb/host/ohci-sa1111.c')
-rw-r--r--drivers/usb/host/ohci-sa1111.c20
1 files changed, 11 insertions, 9 deletions
diff --git a/drivers/usb/host/ohci-sa1111.c b/drivers/usb/host/ohci-sa1111.c
index 95c3f0fb48d3..e1004fb37bd9 100644
--- a/drivers/usb/host/ohci-sa1111.c
+++ b/drivers/usb/host/ohci-sa1111.c
@@ -55,22 +55,25 @@ static void dump_hci_status(struct usb_hcd *hcd, const char *label)
}
#endif
+static int ohci_sa1111_reset(struct usb_hcd *hcd)
+{
+ struct ohci_hcd *ohci = hcd_to_ohci(hcd);
+
+ ohci_hcd_init(ohci);
+ return ohci_init(ohci);
+}
+
static int __devinit ohci_sa1111_start(struct usb_hcd *hcd)
{
struct ohci_hcd *ohci = hcd_to_ohci(hcd);
int ret;
- ret = ohci_init(ohci);
- if (ret < 0)
- return ret;
-
ret = ohci_run(ohci);
if (ret < 0) {
- err("can't start %s", hcd->self.bus_name);
+ ohci_err(ohci, "can't start\n");
ohci_stop(hcd);
- return ret;
}
- return 0;
+ return ret;
}
static const struct hc_driver ohci_sa1111_hc_driver = {
@@ -87,6 +90,7 @@ static const struct hc_driver ohci_sa1111_hc_driver = {
/*
* basic lifecycle operations
*/
+ .reset = ohci_sa1111_reset,
.start = ohci_sa1111_start,
.stop = ohci_stop,
.shutdown = ohci_shutdown,
@@ -200,8 +204,6 @@ static int ohci_hcd_sa1111_probe(struct sa1111_dev *dev)
if (ret)
goto err2;
- ohci_hcd_init(hcd_to_ohci(hcd));
-
ret = usb_add_hcd(hcd, dev->irq[1], 0);
if (ret == 0)
return ret;