summaryrefslogtreecommitdiff
path: root/drivers/pci/hotplug/pciehp_ctrl.c
diff options
context:
space:
mode:
authorLukas Wunner <lukas@wunner.de>2018-08-19 16:29:00 +0200
committerBjorn Helgaas <bhelgaas@google.com>2018-09-17 16:34:36 -0500
commiteee6e273843dc3084c15efc98a78702ac9a4c69b (patch)
treed47be1a16667fd37e921330090d3e16470aa7d0d /drivers/pci/hotplug/pciehp_ctrl.c
parent7d4ba52317c4aab6bbb266f31e28713d397e570c (diff)
PCI: pciehp: Drop hotplug_slot_ops wrappers
pciehp's ->enable_slot, ->disable_slot, ->get_attention_status and ->reset_slot callbacks are currently implemented by wrapper functions that do nothing else but call down to a backend function. The backends are not called from anywhere else, so drop the wrappers and use the backends directly as callbacks, thereby shaving off a few lines of unnecessary code. No functional change intended. 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.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/pci/hotplug/pciehp_ctrl.c b/drivers/pci/hotplug/pciehp_ctrl.c
index ffaf0976e6af..c4d0f902f1d2 100644
--- a/drivers/pci/hotplug/pciehp_ctrl.c
+++ b/drivers/pci/hotplug/pciehp_ctrl.c
@@ -364,8 +364,9 @@ static int pciehp_disable_slot(struct slot *slot, bool safe_removal)
return ret;
}
-int pciehp_sysfs_enable_slot(struct slot *p_slot)
+int pciehp_sysfs_enable_slot(struct hotplug_slot *hotplug_slot)
{
+ struct slot *p_slot = hotplug_slot->private;
struct controller *ctrl = p_slot->ctrl;
mutex_lock(&p_slot->lock);
@@ -402,8 +403,9 @@ int pciehp_sysfs_enable_slot(struct slot *p_slot)
return -ENODEV;
}
-int pciehp_sysfs_disable_slot(struct slot *p_slot)
+int pciehp_sysfs_disable_slot(struct hotplug_slot *hotplug_slot)
{
+ struct slot *p_slot = hotplug_slot->private;
struct controller *ctrl = p_slot->ctrl;
mutex_lock(&p_slot->lock);