Merge branch 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm
[safe/jmp/linux-2.6] / drivers / usb / host / ohci-ssb.c
index fe70e72..23fd6a8 100644 (file)
@@ -60,36 +60,6 @@ static int ssb_ohci_start(struct usb_hcd *hcd)
        return err;
 }
 
-#ifdef CONFIG_PM
-static int ssb_ohci_hcd_suspend(struct usb_hcd *hcd, pm_message_t message)
-{
-       struct ssb_ohci_device *ohcidev = hcd_to_ssb_ohci(hcd);
-       struct ohci_hcd *ohci = &ohcidev->ohci;
-       unsigned long flags;
-
-       spin_lock_irqsave(&ohci->lock, flags);
-
-       ohci_writel(ohci, OHCI_INTR_MIE, &ohci->regs->intrdisable);
-       ohci_readl(ohci, &ohci->regs->intrdisable); /* commit write */
-
-       /* make sure snapshot being resumed re-enumerates everything */
-       if (message.event == PM_EVENT_PRETHAW)
-               ohci_usb_reset(ohci);
-
-       clear_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags);
-
-       spin_unlock_irqrestore(&ohci->lock, flags);
-       return 0;
-}
-
-static int ssb_ohci_hcd_resume(struct usb_hcd *hcd)
-{
-       set_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags);
-       usb_hcd_resume_root_hub(hcd);
-       return 0;
-}
-#endif /* CONFIG_PM */
-
 static const struct hc_driver ssb_ohci_hc_driver = {
        .description            = "ssb-usb-ohci",
        .product_desc           = "SSB OHCI Controller",
@@ -103,11 +73,6 @@ static const struct hc_driver ssb_ohci_hc_driver = {
        .stop                   = ohci_stop,
        .shutdown               = ohci_shutdown,
 
-#ifdef CONFIG_PM
-       .suspend                = ssb_ohci_hcd_suspend,
-       .resume                 = ssb_ohci_hcd_resume,
-#endif
-
        .urb_enqueue            = ohci_urb_enqueue,
        .urb_dequeue            = ohci_urb_dequeue,
        .endpoint_disable       = ohci_endpoint_disable,
@@ -116,7 +81,6 @@ static const struct hc_driver ssb_ohci_hc_driver = {
 
        .hub_status_data        = ohci_hub_status_data,
        .hub_control            = ohci_hub_control,
-       .hub_irq_enable         = ohci_rhsc_enable,
 #ifdef CONFIG_PM
        .bus_suspend            = ohci_bus_suspend,
        .bus_resume             = ohci_bus_resume,
@@ -148,7 +112,7 @@ static int ssb_ohci_attach(struct ssb_device *dev)
        ssb_device_enable(dev, flags);
 
        hcd = usb_create_hcd(&ssb_ohci_hc_driver, dev->dev,
-                       dev->dev->bus_id);
+                       dev_name(dev->dev));
        if (!hcd)
                goto err_dev_disable;
        ohcidev = hcd_to_ssb_ohci(hcd);
@@ -160,7 +124,7 @@ static int ssb_ohci_attach(struct ssb_device *dev)
        hcd->regs = ioremap_nocache(hcd->rsrc_start, hcd->rsrc_len);
        if (!hcd->regs)
                goto err_put_hcd;
-       err = usb_add_hcd(hcd, dev->irq, IRQF_SHARED);
+       err = usb_add_hcd(hcd, dev->irq, IRQF_DISABLED | IRQF_SHARED);
        if (err)
                goto err_iounmap;
 
@@ -224,6 +188,7 @@ static int ssb_ohci_resume(struct ssb_device *dev)
 
        ssb_device_enable(dev, ohcidev->enable_flags);
 
+       ohci_finish_controller_resume(hcd);
        return 0;
 }