diff options
Diffstat (limited to 'drivers/usb/host/ohci-at91.c')
-rw-r--r-- | drivers/usb/host/ohci-at91.c | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/drivers/usb/host/ohci-at91.c b/drivers/usb/host/ohci-at91.c index 13ebeca8e73e..a665b3eaa746 100644 --- a/drivers/usb/host/ohci-at91.c +++ b/drivers/usb/host/ohci-at91.c | |||
@@ -129,7 +129,7 @@ static int __devinit usb_hcd_at91_probe(const struct hc_driver *driver, | |||
129 | if (!hcd) | 129 | if (!hcd) |
130 | return -ENOMEM; | 130 | return -ENOMEM; |
131 | hcd->rsrc_start = pdev->resource[0].start; | 131 | hcd->rsrc_start = pdev->resource[0].start; |
132 | hcd->rsrc_len = pdev->resource[0].end - pdev->resource[0].start + 1; | 132 | hcd->rsrc_len = resource_size(&pdev->resource[0]); |
133 | 133 | ||
134 | if (!request_mem_region(hcd->rsrc_start, hcd->rsrc_len, hcd_name)) { | 134 | if (!request_mem_region(hcd->rsrc_start, hcd->rsrc_len, hcd_name)) { |
135 | pr_debug("request_mem_region failed\n"); | 135 | pr_debug("request_mem_region failed\n"); |
@@ -223,7 +223,7 @@ static void __devexit usb_hcd_at91_remove(struct usb_hcd *hcd, | |||
223 | /*-------------------------------------------------------------------------*/ | 223 | /*-------------------------------------------------------------------------*/ |
224 | 224 | ||
225 | static int __devinit | 225 | static int __devinit |
226 | ohci_at91_start (struct usb_hcd *hcd) | 226 | ohci_at91_reset (struct usb_hcd *hcd) |
227 | { | 227 | { |
228 | struct at91_usbh_data *board = hcd->self.controller->platform_data; | 228 | struct at91_usbh_data *board = hcd->self.controller->platform_data; |
229 | struct ohci_hcd *ohci = hcd_to_ohci (hcd); | 229 | struct ohci_hcd *ohci = hcd_to_ohci (hcd); |
@@ -233,9 +233,18 @@ ohci_at91_start (struct usb_hcd *hcd) | |||
233 | return ret; | 233 | return ret; |
234 | 234 | ||
235 | ohci->num_ports = board->ports; | 235 | ohci->num_ports = board->ports; |
236 | return 0; | ||
237 | } | ||
238 | |||
239 | static int __devinit | ||
240 | ohci_at91_start (struct usb_hcd *hcd) | ||
241 | { | ||
242 | struct ohci_hcd *ohci = hcd_to_ohci (hcd); | ||
243 | int ret; | ||
236 | 244 | ||
237 | if ((ret = ohci_run(ohci)) < 0) { | 245 | if ((ret = ohci_run(ohci)) < 0) { |
238 | err("can't start %s", hcd->self.bus_name); | 246 | dev_err(hcd->self.controller, "can't start %s\n", |
247 | hcd->self.bus_name); | ||
239 | ohci_stop(hcd); | 248 | ohci_stop(hcd); |
240 | return ret; | 249 | return ret; |
241 | } | 250 | } |
@@ -418,6 +427,7 @@ static const struct hc_driver ohci_at91_hc_driver = { | |||
418 | /* | 427 | /* |
419 | * basic lifecycle operations | 428 | * basic lifecycle operations |
420 | */ | 429 | */ |
430 | .reset = ohci_at91_reset, | ||
421 | .start = ohci_at91_start, | 431 | .start = ohci_at91_start, |
422 | .stop = ohci_stop, | 432 | .stop = ohci_stop, |
423 | .shutdown = ohci_shutdown, | 433 | .shutdown = ohci_shutdown, |