aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/host
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@arm.linux.org.uk>2012-01-26 06:45:27 -0500
committerRussell King <rmk+kernel@arm.linux.org.uk>2012-03-24 07:30:14 -0400
commit81e6ca3eb74d6bdbab181dd2db378f49f76f0d97 (patch)
tree13e0d411de7743e14c0ffc3a81357c96be5be554 /drivers/usb/host
parent846a70487e2a0e5045c6a428a0969d3e0490b359 (diff)
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')
-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)
55} 55}
56#endif 56#endif
57 57
58static int ohci_sa1111_reset(struct usb_hcd *hcd)
59{
60 struct ohci_hcd *ohci = hcd_to_ohci(hcd);
61
62 ohci_hcd_init(ohci);
63 return ohci_init(ohci);
64}
65
58static int __devinit ohci_sa1111_start(struct usb_hcd *hcd) 66static int __devinit ohci_sa1111_start(struct usb_hcd *hcd)
59{ 67{
60 struct ohci_hcd *ohci = hcd_to_ohci(hcd); 68 struct ohci_hcd *ohci = hcd_to_ohci(hcd);
61 int ret; 69 int ret;
62 70
63 ret = ohci_init(ohci);
64 if (ret < 0)
65 return ret;
66
67 ret = ohci_run(ohci); 71 ret = ohci_run(ohci);
68 if (ret < 0) { 72 if (ret < 0) {
69 err("can't start %s", hcd->self.bus_name); 73 ohci_err(ohci, "can't start\n");
70 ohci_stop(hcd); 74 ohci_stop(hcd);
71 return ret;
72 } 75 }
73 return 0; 76 return ret;
74} 77}
75 78
76static const struct hc_driver ohci_sa1111_hc_driver = { 79static const struct hc_driver ohci_sa1111_hc_driver = {
@@ -87,6 +90,7 @@ static const struct hc_driver ohci_sa1111_hc_driver = {
87 /* 90 /*
88 * basic lifecycle operations 91 * basic lifecycle operations
89 */ 92 */
93 .reset = ohci_sa1111_reset,
90 .start = ohci_sa1111_start, 94 .start = ohci_sa1111_start,
91 .stop = ohci_stop, 95 .stop = ohci_stop,
92 .shutdown = ohci_shutdown, 96 .shutdown = ohci_shutdown,
@@ -200,8 +204,6 @@ static int ohci_hcd_sa1111_probe(struct sa1111_dev *dev)
200 if (ret) 204 if (ret)
201 goto err2; 205 goto err2;
202 206
203 ohci_hcd_init(hcd_to_ohci(hcd));
204
205 ret = usb_add_hcd(hcd, dev->irq[1], 0); 207 ret = usb_add_hcd(hcd, dev->irq[1], 0);
206 if (ret == 0) 208 if (ret == 0)
207 return ret; 209 return ret;