Merge tag 'mfd-3.5-1' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-2.6
[deliverable/linux.git] / drivers / usb / host / ohci-at91.c
index 13ebeca8e73e3e5f78f52b6001ebc3464f40a432..a665b3eaa74672f28e7d011b1ea4da265667187f 100644 (file)
@@ -129,7 +129,7 @@ static int __devinit usb_hcd_at91_probe(const struct hc_driver *driver,
        if (!hcd)
                return -ENOMEM;
        hcd->rsrc_start = pdev->resource[0].start;
-       hcd->rsrc_len = pdev->resource[0].end - pdev->resource[0].start + 1;
+       hcd->rsrc_len = resource_size(&pdev->resource[0]);
 
        if (!request_mem_region(hcd->rsrc_start, hcd->rsrc_len, hcd_name)) {
                pr_debug("request_mem_region failed\n");
@@ -223,7 +223,7 @@ static void __devexit usb_hcd_at91_remove(struct usb_hcd *hcd,
 /*-------------------------------------------------------------------------*/
 
 static int __devinit
-ohci_at91_start (struct usb_hcd *hcd)
+ohci_at91_reset (struct usb_hcd *hcd)
 {
        struct at91_usbh_data   *board = hcd->self.controller->platform_data;
        struct ohci_hcd         *ohci = hcd_to_ohci (hcd);
@@ -233,9 +233,18 @@ ohci_at91_start (struct usb_hcd *hcd)
                return ret;
 
        ohci->num_ports = board->ports;
+       return 0;
+}
+
+static int __devinit
+ohci_at91_start (struct usb_hcd *hcd)
+{
+       struct ohci_hcd         *ohci = hcd_to_ohci (hcd);
+       int                     ret;
 
        if ((ret = ohci_run(ohci)) < 0) {
-               err("can't start %s", hcd->self.bus_name);
+               dev_err(hcd->self.controller, "can't start %s\n",
+                       hcd->self.bus_name);
                ohci_stop(hcd);
                return ret;
        }
@@ -418,6 +427,7 @@ static const struct hc_driver ohci_at91_hc_driver = {
        /*
         * basic lifecycle operations
         */
+       .reset =                ohci_at91_reset,
        .start =                ohci_at91_start,
        .stop =                 ohci_stop,
        .shutdown =             ohci_shutdown,
This page took 0.030241 seconds and 5 git commands to generate.