提交 60ed982a 编写于 作者: R Rajat Jain 提交者: Bjorn Helgaas

PCI/AER: Move internal declarations to drivers/pci/pci.h

Since pci_aer_init() and pci_no_aer() are used only internally, move their
declarations to the PCI internal header file.  Also, no one cares about
return value of pci_aer_init(), so make it void.
Signed-off-by: NRajat Jain <rajatja@google.com>
Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
上级 bd237801
...@@ -480,4 +480,12 @@ static inline int devm_of_pci_get_host_bridge_resources(struct device *dev, ...@@ -480,4 +480,12 @@ static inline int devm_of_pci_get_host_bridge_resources(struct device *dev,
} }
#endif #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 */ #endif /* DRIVERS_PCI_H */
...@@ -382,10 +382,10 @@ int pci_cleanup_aer_error_status_regs(struct pci_dev *dev) ...@@ -382,10 +382,10 @@ int pci_cleanup_aer_error_status_regs(struct pci_dev *dev)
return 0; 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); 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 #define AER_AGENT_RECEIVER 0
......
...@@ -1468,13 +1468,9 @@ static inline bool pcie_aspm_support_enabled(void) { return false; } ...@@ -1468,13 +1468,9 @@ static inline bool pcie_aspm_support_enabled(void) { return false; }
#endif #endif
#ifdef CONFIG_PCIEAER #ifdef CONFIG_PCIEAER
void pci_no_aer(void);
bool pci_aer_available(void); bool pci_aer_available(void);
int pci_aer_init(struct pci_dev *dev);
#else #else
static inline void pci_no_aer(void) { }
static inline bool pci_aer_available(void) { return false; } static inline bool pci_aer_available(void) { return false; }
static inline int pci_aer_init(struct pci_dev *d) { return -ENODEV; }
#endif #endif
#ifdef CONFIG_PCIE_ECRC #ifdef CONFIG_PCIE_ECRC
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册