]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - drivers/pci/hotplug/shpchp_core.c
Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/driver-2.6
[mv-sheeva.git] / drivers / pci / hotplug / shpchp_core.c
index 0e83c5fbc9df1a157891185ded5a923d5638de7c..a14e7de1984621cd9281751df06cc0624fee5d87 100644 (file)
@@ -104,6 +104,23 @@ static void make_slot_name(struct slot *slot)
                 slot->bus, slot->number);
 }
 
+
+
+
+static int
+shpchprm_get_physical_slot_number(struct controller *ctrl, u32 *sun,
+                               u8 busnum, u8 devnum)
+{
+       int offset = devnum - ctrl->slot_device_offset;
+
+       dbg("%s: ctrl->slot_num_inc %d, offset %d\n", __FUNCTION__,
+                       ctrl->slot_num_inc, offset);
+       *sun = (u8) (ctrl->first_slot + ctrl->slot_num_inc *offset);
+       return 0;
+}
+
+
+
 static int init_slots(struct controller *ctrl)
 {
        struct slot *slot;
@@ -474,16 +491,9 @@ 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;
 }
 
@@ -491,7 +501,6 @@ 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");
 }