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>
This commit is contained in:

committed by
Bjorn Helgaas

parent
7d4ba52317
commit
eee6e27384
@@ -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);
|
||||
|
Reference in New Issue
Block a user