Revert to Fedora kernel-2.6.17-1.2187_FC5 patched with vs2.0.2.1; there are too many...
[linux-2.6.git] / drivers / pci / hotplug / shpchp_core.c
index a14e7de..3be4d49 100644 (file)
@@ -491,9 +491,16 @@ static int __init shpcd_init(void)
        shpchp_poll_mode = 1;
 #endif
 
+       shpchp_wq = create_singlethread_workqueue("shpchpd");
+       if (!shpchp_wq)
+               return -ENOMEM;
+
        retval = pci_register_driver(&shpc_driver);
        dbg("%s: pci_register_driver = %d\n", __FUNCTION__, retval);
        info(DRIVER_DESC " version: " DRIVER_VERSION "\n");
+       if (retval) {
+               destroy_workqueue(shpchp_wq);
+       }
        return retval;
 }
 
@@ -501,6 +508,7 @@ static void __exit shpcd_cleanup(void)
 {
        dbg("unload_shpchpd()\n");
        pci_unregister_driver(&shpc_driver);
+       destroy_workqueue(shpchp_wq);
        info(DRIVER_DESC " version: " DRIVER_VERSION " unloaded\n");
 }