]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/usb/host/uhci-hcd.c
USB: fix up suspend and resume for PCI host controllers
[linux-2.6-omap-h63xx.git] / drivers / usb / host / uhci-hcd.c
index 2dddb258b0db1a8261bd1b8259ecfc2ce69d284c..4e221060f58c5d5a3d3c856883bba3618fa5c284 100644 (file)
@@ -942,6 +942,8 @@ static struct pci_driver uhci_pci_driver = {
 
 #ifdef CONFIG_PM
        .suspend =      usb_hcd_pci_suspend,
+       .suspend_late = usb_hcd_pci_suspend_late,
+       .resume_early = usb_hcd_pci_resume_early,
        .resume =       usb_hcd_pci_resume,
 #endif /* PM */
 };
@@ -955,6 +957,7 @@ static int __init uhci_hcd_init(void)
 
        printk(KERN_INFO "uhci_hcd: " DRIVER_DESC "%s\n",
                        ignore_oc ? ", overcurrent ignored" : "");
+       set_bit(USB_UHCI_LOADED, &usb_hcds_loaded);
 
        if (DEBUG_CONFIGURED) {
                errbuf = kmalloc(ERRBUF_LEN, GFP_KERNEL);
@@ -987,6 +990,7 @@ debug_failed:
 
 errbuf_failed:
 
+       clear_bit(USB_UHCI_LOADED, &usb_hcds_loaded);
        return retval;
 }
 
@@ -996,6 +1000,7 @@ static void __exit uhci_hcd_cleanup(void)
        kmem_cache_destroy(uhci_up_cachep);
        debugfs_remove(uhci_debugfs_root);
        kfree(errbuf);
+       clear_bit(USB_UHCI_LOADED, &usb_hcds_loaded);
 }
 
 module_init(uhci_hcd_init);