summaryrefslogtreecommitdiff
path: root/drivers/pci/hotplug/pciehp_ctrl.c
diff options
context:
space:
mode:
authorLukas Wunner <lukas@wunner.de>2018-07-19 17:27:46 -0500
committerBjorn Helgaas <helgaas@kernel.org>2018-07-23 17:04:15 -0500
commit1656716d45d0aae8c0a21a0553b9d27cd98fda61 (patch)
tree949a72be5647e6bec3daf6fa9b5e1799ce24993e /drivers/pci/hotplug/pciehp_ctrl.c
parent32a8cef274feacd00b748a4f13b84d60aa6d82ff (diff)
PCI: pciehp: Drop enable/disable lock
Previously slot enablement and disablement could happen concurrently. But now it's under the exclusive control of the IRQ thread, rendering the locking obsolete. Drop it. Signed-off-by: Lukas Wunner <lukas@wunner.de> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Diffstat (limited to 'drivers/pci/hotplug/pciehp_ctrl.c')
-rw-r--r--drivers/pci/hotplug/pciehp_ctrl.c11
1 files changed, 0 insertions, 11 deletions
diff --git a/drivers/pci/hotplug/pciehp_ctrl.c b/drivers/pci/hotplug/pciehp_ctrl.c
index 70bad847a450..8ba937599fb3 100644
--- a/drivers/pci/hotplug/pciehp_ctrl.c
+++ b/drivers/pci/hotplug/pciehp_ctrl.c
@@ -277,9 +277,6 @@ void pciehp_handle_presence_change(struct slot *slot)
}
}
-/*
- * Note: This function must be called with slot->hotplug_lock held
- */
static int __pciehp_enable_slot(struct slot *p_slot)
{
u8 getstatus = 0;
@@ -316,10 +313,7 @@ int pciehp_enable_slot(struct slot *slot)
struct controller *ctrl = slot->ctrl;
int ret;
- mutex_lock(&slot->hotplug_lock);
ret = __pciehp_enable_slot(slot);
- mutex_unlock(&slot->hotplug_lock);
-
if (ret && ATTN_BUTTN(ctrl))
pciehp_green_led_off(slot); /* may be blinking */
@@ -330,9 +324,6 @@ int pciehp_enable_slot(struct slot *slot)
return ret;
}
-/*
- * Note: This function must be called with slot->hotplug_lock held
- */
static int __pciehp_disable_slot(struct slot *p_slot)
{
u8 getstatus = 0;
@@ -355,9 +346,7 @@ int pciehp_disable_slot(struct slot *slot)
{
int ret;
- mutex_lock(&slot->hotplug_lock);
ret = __pciehp_disable_slot(slot);
- mutex_unlock(&slot->hotplug_lock);
mutex_lock(&slot->lock);
slot->state = OFF_STATE;