diff options
Diffstat (limited to 'drivers/pci')
-rw-r--r-- | drivers/pci/pci.h | 8 | ||||
-rw-r--r-- | drivers/pci/pcie/aer.c | 4 |
2 files changed, 10 insertions, 2 deletions
diff --git a/drivers/pci/pci.h b/drivers/pci/pci.h index 4f723442f602..52bc5b350dfb 100644 --- a/drivers/pci/pci.h +++ b/drivers/pci/pci.h @@ -480,4 +480,12 @@ static inline int devm_of_pci_get_host_bridge_resources(struct device *dev, } #endif +#ifdef CONFIG_PCIEAER +void pci_no_aer(void); +void pci_aer_init(struct pci_dev *dev); +#else +static inline void pci_no_aer(void) { } +static inline int pci_aer_init(struct pci_dev *d) { return -ENODEV; } +#endif + #endif /* DRIVERS_PCI_H */ diff --git a/drivers/pci/pcie/aer.c b/drivers/pci/pcie/aer.c index e6d5255d718c..0c6fe22eaf75 100644 --- a/drivers/pci/pcie/aer.c +++ b/drivers/pci/pcie/aer.c @@ -382,10 +382,10 @@ int pci_cleanup_aer_error_status_regs(struct pci_dev *dev) return 0; } -int pci_aer_init(struct pci_dev *dev) +void pci_aer_init(struct pci_dev *dev) { dev->aer_cap = pci_find_ext_capability(dev, PCI_EXT_CAP_ID_ERR); - return pci_cleanup_aer_error_status_regs(dev); + pci_cleanup_aer_error_status_regs(dev); } #define AER_AGENT_RECEIVER 0 |