diff options
author | Lukas Wunner <lukas@wunner.de> | 2018-08-19 17:29:00 +0300 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2018-09-18 00:34:36 +0300 |
commit | eee6e273843dc3084c15efc98a78702ac9a4c69b (patch) | |
tree | d47be1a16667fd37e921330090d3e16470aa7d0d /drivers/pci/hotplug/pciehp_hpc.c | |
parent | 7d4ba52317c4aab6bbb266f31e28713d397e570c (diff) | |
download | linux-eee6e273843dc3084c15efc98a78702ac9a4c69b.tar.xz |
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_hpc.c')
-rw-r--r-- | drivers/pci/hotplug/pciehp_hpc.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/pci/hotplug/pciehp_hpc.c b/drivers/pci/hotplug/pciehp_hpc.c index c3295ebf896d..93003ff81166 100644 --- a/drivers/pci/hotplug/pciehp_hpc.c +++ b/drivers/pci/hotplug/pciehp_hpc.c @@ -326,8 +326,9 @@ int pciehp_get_raw_indicator_status(struct hotplug_slot *hotplug_slot, return 0; } -void pciehp_get_attention_status(struct slot *slot, u8 *status) +int pciehp_get_attention_status(struct hotplug_slot *hotplug_slot, u8 *status) { + struct slot *slot = hotplug_slot->private; struct controller *ctrl = slot->ctrl; struct pci_dev *pdev = ctrl_dev(ctrl); u16 slot_ctrl; @@ -352,6 +353,8 @@ void pciehp_get_attention_status(struct slot *slot, u8 *status) *status = 0xFF; break; } + + return 0; } void pciehp_get_power_status(struct slot *slot, u8 *status) @@ -753,8 +756,9 @@ void pcie_clear_hotplug_events(struct controller *ctrl) * momentarily, if we see that they could interfere. Also, clear any spurious * events after. */ -int pciehp_reset_slot(struct slot *slot, int probe) +int pciehp_reset_slot(struct hotplug_slot *hotplug_slot, int probe) { + struct slot *slot = hotplug_slot->private; struct controller *ctrl = slot->ctrl; struct pci_dev *pdev = ctrl_dev(ctrl); u16 stat_mask = 0, ctrl_mask = 0; |