diff options
author | Frederick Lawler <fred@fredlawl.com> | 2018-03-23 00:20:55 +0300 |
---|---|---|
committer | Bjorn Helgaas <helgaas@kernel.org> | 2018-03-31 01:26:59 +0300 |
commit | f0553ba08a19031726f120448eedc3aff1599c23 (patch) | |
tree | 201fa5b774ff6878712f8cad042f2cf459c3a79e /drivers/pci/pcie/aer/ecrc.c | |
parent | d850882b726f6db01b0792151e72e69b234aa461 (diff) | |
download | linux-f0553ba08a19031726f120448eedc3aff1599c23.tar.xz |
PCI/AER: Use cached AER Capability offset
Replace pci_find_ext_capability(..., PCI_EXT_CAP_ID_ERR) calls with
pci_dev->aer_cap.
pci_dev->aer_cap is initialized in pci_init_capabilities(), which happens
before any of these users of the AER Capability.
Signed-off-by: Frederick Lawler <fred@fredlawl.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Diffstat (limited to 'drivers/pci/pcie/aer/ecrc.c')
-rw-r--r-- | drivers/pci/pcie/aer/ecrc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/pci/pcie/aer/ecrc.c b/drivers/pci/pcie/aer/ecrc.c index 26d3cac9e635..afb5f761f5d4 100644 --- a/drivers/pci/pcie/aer/ecrc.c +++ b/drivers/pci/pcie/aer/ecrc.c @@ -40,7 +40,7 @@ static int enable_ecrc_checking(struct pci_dev *dev) if (!pci_is_pcie(dev)) return -ENODEV; - pos = pci_find_ext_capability(dev, PCI_EXT_CAP_ID_ERR); + pos = dev->aer_cap; if (!pos) return -ENODEV; @@ -68,7 +68,7 @@ static int disable_ecrc_checking(struct pci_dev *dev) if (!pci_is_pcie(dev)) return -ENODEV; - pos = pci_find_ext_capability(dev, PCI_EXT_CAP_ID_ERR); + pos = dev->aer_cap; if (!pos) return -ENODEV; |