diff options
author | Lukas Wunner <lukas@wunner.de> | 2018-07-19 17:27:42 -0500 |
---|---|---|
committer | Bjorn Helgaas <helgaas@kernel.org> | 2018-07-23 17:04:13 -0500 |
commit | 55a6b7a6576d6cba77bb2ce2bfb2126df83df58a (patch) | |
tree | 7c496fba003e8f656ee79cd5108bfd982af90c1c /drivers/pci/hotplug/pciehp_hpc.c | |
parent | 0e94916e6091f48391b65110e71c87c583021640 (diff) | |
download | blackbird-op-linux-55a6b7a6576d6cba77bb2ce2bfb2126df83df58a.tar.gz blackbird-op-linux-55a6b7a6576d6cba77bb2ce2bfb2126df83df58a.zip |
PCI: pciehp: Drop slot workqueue
Previously the slot workqueue was used to handle events and enable or
disable the slot. That's no longer the case as those tasks are done
synchronously in the IRQ thread. The slot workqueue is thus merely used
to handle a button press after the 5 second delay and only one such work
item may be in flight at any given time. A separate workqueue isn't
necessary for this simple task, so use the system workqueue instead.
Signed-off-by: Lukas Wunner <lukas@wunner.de>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Diffstat (limited to 'drivers/pci/hotplug/pciehp_hpc.c')
-rw-r--r-- | drivers/pci/hotplug/pciehp_hpc.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/drivers/pci/hotplug/pciehp_hpc.c b/drivers/pci/hotplug/pciehp_hpc.c index 31544998e1bd..dcbdee50cd85 100644 --- a/drivers/pci/hotplug/pciehp_hpc.c +++ b/drivers/pci/hotplug/pciehp_hpc.c @@ -767,26 +767,19 @@ static int pcie_init_slot(struct controller *ctrl) if (!slot) return -ENOMEM; - slot->wq = alloc_ordered_workqueue("pciehp-%u", 0, PSN(ctrl)); - if (!slot->wq) - goto abort; - slot->ctrl = ctrl; mutex_init(&slot->lock); mutex_init(&slot->hotplug_lock); INIT_DELAYED_WORK(&slot->work, pciehp_queue_pushbutton_work); ctrl->slot = slot; return 0; -abort: - kfree(slot); - return -ENOMEM; } static void pcie_cleanup_slot(struct controller *ctrl) { struct slot *slot = ctrl->slot; - destroy_workqueue(slot->wq); + cancel_delayed_work_sync(&slot->work); kfree(slot); } |