]> 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 3a7bfe7a8874c321990bb802910ea4a902671c9a..4e221060f58c5d5a3d3c856883bba3618fa5c284 100644 (file)
@@ -53,7 +53,6 @@
 /*
  * Version Information
  */
-#define DRIVER_VERSION "v3.0"
 #define DRIVER_AUTHOR "Linus 'Frodo Rabbit' Torvalds, Johannes Erdfelt, \
 Randy Dunlap, Georg Acher, Deti Fliegl, Thomas Sailer, Roman Weissgaerber, \
 Alan Stern"
@@ -943,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 */
 };
@@ -951,12 +952,13 @@ static int __init uhci_hcd_init(void)
 {
        int retval = -ENOMEM;
 
-       printk(KERN_INFO DRIVER_DESC " " DRIVER_VERSION "%s\n",
-                       ignore_oc ? ", overcurrent ignored" : "");
-
        if (usb_disabled())
                return -ENODEV;
 
+       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);
                if (!errbuf)
@@ -988,6 +990,7 @@ debug_failed:
 
 errbuf_failed:
 
+       clear_bit(USB_UHCI_LOADED, &usb_hcds_loaded);
        return retval;
 }
 
@@ -997,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);