diff options
author | 2022-06-24 17:34:23 +0300 | |
---|---|---|
committer | 2022-07-05 19:00:52 -0500 | |
commit | a37beefbde8802a4eab2545fee1b1780a03f2aa0 (patch) | |
tree | 26dfa298be0427e57b44ea9c8712afe2bed90d10 /drivers/pci/controller/dwc/pci-keystone.c | |
parent | PCI: dwc: Reuse local pointer to the resource data (diff) | |
download | wireguard-linux-a37beefbde8802a4eab2545fee1b1780a03f2aa0.tar.xz wireguard-linux-a37beefbde8802a4eab2545fee1b1780a03f2aa0.zip |
PCI: dwc: Add start_link/stop_link inlines
Factor out this pattern:
if (!pci->ops || !pci->ops->start_link)
return -EINVAL;
return pci->ops->start_link(pci);
into a new dw_pcie_start_link() wrapper and do the same for the stop_link()
method.
Note that dw_pcie_ep_start() previously returned -EINVAL if there was no
platform start_link() method, which didn't make much sense since that is
not an error. It will now return 0 in that case.
As a side-effect, drop the empty start_link() and dummy dw_pcie_ops
instances from the generic DW PCIe and Layerscape EP platform drivers.
[bhelgaas: commit log]
Link: https://lore.kernel.org/r/20220624143428.8334-14-Sergey.Semin@baikalelectronics.ru
Signed-off-by: Serge Semin <Sergey.Semin@baikalelectronics.ru>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Diffstat (limited to 'drivers/pci/controller/dwc/pci-keystone.c')
0 files changed, 0 insertions, 0 deletions