diff options
author | Bjorn Helgaas <bhelgaas@google.com> | 2018-06-08 15:40:16 +0200 |
---|---|---|
committer | Bjorn Helgaas <helgaas@kernel.org> | 2018-06-11 15:11:11 +0200 |
commit | 0544b04b792696d6e408f3a882d1a36943084fa8 (patch) | |
tree | 07867b29ecbba2294041d954f770eee41908c315 /drivers/pci/pcie/portdrv.h | |
parent | PCI/AER: Remove duplicate pcie_port_bus_type declaration (diff) | |
download | linux-0544b04b792696d6e408f3a882d1a36943084fa8.tar.xz linux-0544b04b792696d6e408f3a882d1a36943084fa8.zip |
PCI/AER: Move pcie_aer_get_firmware_first() to portdrv.h
Move pcie_aer_get_firmware_first() to portdrv.h, where it can be more
easily shared between AER and DPC. Then DPC no longer needs to include
aer/aerdrv.h. No functional change intended.
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Keith Busch <keith.busch@intel.com>
Diffstat (limited to 'drivers/pci/pcie/portdrv.h')
-rw-r--r-- | drivers/pci/pcie/portdrv.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/pci/pcie/portdrv.h b/drivers/pci/pcie/portdrv.h index 2bb5db7b53e6..6a261dc7cd4c 100644 --- a/drivers/pci/pcie/portdrv.h +++ b/drivers/pci/pcie/portdrv.h @@ -110,6 +110,17 @@ static inline bool pcie_pme_no_msi(void) { return false; } static inline void pcie_pme_interrupt_enable(struct pci_dev *dev, bool en) {} #endif /* !CONFIG_PCIE_PME */ +#ifdef CONFIG_ACPI_APEI +int pcie_aer_get_firmware_first(struct pci_dev *pci_dev); +#else +static inline int pcie_aer_get_firmware_first(struct pci_dev *pci_dev) +{ + if (pci_dev->__aer_firmware_first_valid) + return pci_dev->__aer_firmware_first; + return 0; +} +#endif + struct pcie_port_service_driver *pcie_port_find_service(struct pci_dev *dev, u32 service); struct device *pcie_port_find_device(struct pci_dev *dev, u32 service); |