aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci/hotplug/shpchp_core.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/pci/hotplug/shpchp_core.c')
-rw-r--r--drivers/pci/hotplug/shpchp_core.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/pci/hotplug/shpchp_core.c b/drivers/pci/hotplug/shpchp_core.c
index 5de659d23d1a..fa60ae47d91d 100644
--- a/drivers/pci/hotplug/shpchp_core.c
+++ b/drivers/pci/hotplug/shpchp_core.c
@@ -136,13 +136,14 @@ static int init_slots(struct controller *ctrl)
136 slot->bus = ctrl->slot_bus; 136 slot->bus = ctrl->slot_bus;
137 slot->device = ctrl->slot_device_offset + i; 137 slot->device = ctrl->slot_device_offset + i;
138 slot->hpc_ops = ctrl->hpc_ops; 138 slot->hpc_ops = ctrl->hpc_ops;
139 mutex_init(&slot->lock);
139 140
140 if (shpchprm_get_physical_slot_number(ctrl, &sun, 141 if (shpchprm_get_physical_slot_number(ctrl, &sun,
141 slot->bus, slot->device)) 142 slot->bus, slot->device))
142 goto error_info; 143 goto error_info;
143 144
144 slot->number = sun; 145 slot->number = sun;
145 INIT_WORK(&slot->work, shpchp_pushbutton_thread, slot); 146 INIT_WORK(&slot->work, queue_pushbutton_work, slot);
146 147
147 /* register this slot with the hotplug pci core */ 148 /* register this slot with the hotplug pci core */
148 hotplug_slot->private = slot; 149 hotplug_slot->private = slot;
@@ -188,6 +189,7 @@ void cleanup_slots(struct controller *ctrl)
188 slot = list_entry(tmp, struct slot, slot_list); 189 slot = list_entry(tmp, struct slot, slot_list);
189 list_del(&slot->slot_list); 190 list_del(&slot->slot_list);
190 cancel_delayed_work(&slot->work); 191 cancel_delayed_work(&slot->work);
192 flush_scheduled_work();
191 flush_workqueue(shpchp_wq); 193 flush_workqueue(shpchp_wq);
192 pci_hp_deregister(slot->hotplug_slot); 194 pci_hp_deregister(slot->hotplug_slot);
193 } 195 }
@@ -244,7 +246,7 @@ static int enable_slot (struct hotplug_slot *hotplug_slot)
244 246
245 dbg("%s - physical_slot = %s\n", __FUNCTION__, hotplug_slot->name); 247 dbg("%s - physical_slot = %s\n", __FUNCTION__, hotplug_slot->name);
246 248
247 return shpchp_enable_slot(slot); 249 return shpchp_sysfs_enable_slot(slot);
248} 250}
249 251
250static int disable_slot (struct hotplug_slot *hotplug_slot) 252static int disable_slot (struct hotplug_slot *hotplug_slot)
@@ -253,7 +255,7 @@ static int disable_slot (struct hotplug_slot *hotplug_slot)
253 255
254 dbg("%s - physical_slot = %s\n", __FUNCTION__, hotplug_slot->name); 256 dbg("%s - physical_slot = %s\n", __FUNCTION__, hotplug_slot->name);
255 257
256 return shpchp_disable_slot(slot); 258 return shpchp_sysfs_disable_slot(slot);
257} 259}
258 260
259static int get_power_status (struct hotplug_slot *hotplug_slot, u8 *value) 261static int get_power_status (struct hotplug_slot *hotplug_slot, u8 *value)