diff options
| author | Bjorn Helgaas <bhelgaas@google.com> | 2014-01-13 19:01:11 -0500 |
|---|---|---|
| committer | Bjorn Helgaas <bhelgaas@google.com> | 2014-01-13 19:01:11 -0500 |
| commit | 4c85980429f2769bd11c91c7cd90d297aef31fbd (patch) | |
| tree | 2a73c4e6e09a6047128e56f48102c83671b42a39 /include/linux | |
| parent | 597db6f38c4bcb90406d4e2f56446ba5a5dc20c6 (diff) | |
PCI: Reorder so actual code comes before stubs
Consistently use the:
#ifdef CONFIG_PCI_FOO
int pci_foo(...);
#else
static inline int pci_foo(...) { return -1; }
#endif
pattern, instead of sometimes using "#ifndef CONFIG_PCI_FOO".
No functional change.
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/pci.h | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/include/linux/pci.h b/include/linux/pci.h index eba7764b1586..39a3609c8cda 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h | |||
| @@ -1149,7 +1149,22 @@ struct msix_entry { | |||
| 1149 | }; | 1149 | }; |
| 1150 | 1150 | ||
| 1151 | 1151 | ||
| 1152 | #ifndef CONFIG_PCI_MSI | 1152 | #ifdef CONFIG_PCI_MSI |
| 1153 | int pci_msi_vec_count(struct pci_dev *dev); | ||
| 1154 | int pci_enable_msi_block(struct pci_dev *dev, int nvec); | ||
| 1155 | void pci_msi_shutdown(struct pci_dev *dev); | ||
| 1156 | void pci_disable_msi(struct pci_dev *dev); | ||
| 1157 | int pci_msix_vec_count(struct pci_dev *dev); | ||
| 1158 | int pci_enable_msix(struct pci_dev *dev, struct msix_entry *entries, int nvec); | ||
| 1159 | void pci_msix_shutdown(struct pci_dev *dev); | ||
| 1160 | void pci_disable_msix(struct pci_dev *dev); | ||
| 1161 | void msi_remove_pci_irq_vectors(struct pci_dev *dev); | ||
| 1162 | void pci_restore_msi_state(struct pci_dev *dev); | ||
| 1163 | int pci_msi_enabled(void); | ||
| 1164 | int pci_enable_msi_range(struct pci_dev *dev, int minvec, int maxvec); | ||
| 1165 | int pci_enable_msix_range(struct pci_dev *dev, struct msix_entry *entries, | ||
| 1166 | int minvec, int maxvec); | ||
| 1167 | #else | ||
| 1153 | static inline int pci_msi_vec_count(struct pci_dev *dev) | 1168 | static inline int pci_msi_vec_count(struct pci_dev *dev) |
| 1154 | { | 1169 | { |
| 1155 | return -ENOSYS; | 1170 | return -ENOSYS; |
| @@ -1200,21 +1215,6 @@ static inline int pci_enable_msix_range(struct pci_dev *dev, | |||
| 1200 | { | 1215 | { |
| 1201 | return -ENOSYS; | 1216 | return -ENOSYS; |
| 1202 | } | 1217 | } |
| 1203 | #else | ||
| 1204 | int pci_msi_vec_count(struct pci_dev *dev); | ||
| 1205 | int pci_enable_msi_block(struct pci_dev *dev, int nvec); | ||
| 1206 | void pci_msi_shutdown(struct pci_dev *dev); | ||
| 1207 | void pci_disable_msi(struct pci_dev *dev); | ||
| 1208 | int pci_msix_vec_count(struct pci_dev *dev); | ||
| 1209 | int pci_enable_msix(struct pci_dev *dev, struct msix_entry *entries, int nvec); | ||
| 1210 | void pci_msix_shutdown(struct pci_dev *dev); | ||
| 1211 | void pci_disable_msix(struct pci_dev *dev); | ||
| 1212 | void msi_remove_pci_irq_vectors(struct pci_dev *dev); | ||
| 1213 | void pci_restore_msi_state(struct pci_dev *dev); | ||
| 1214 | int pci_msi_enabled(void); | ||
| 1215 | int pci_enable_msi_range(struct pci_dev *dev, int minvec, int maxvec); | ||
| 1216 | int pci_enable_msix_range(struct pci_dev *dev, struct msix_entry *entries, | ||
| 1217 | int minvec, int maxvec); | ||
| 1218 | #endif | 1218 | #endif |
| 1219 | 1219 | ||
| 1220 | #ifdef CONFIG_PCIEPORTBUS | 1220 | #ifdef CONFIG_PCIEPORTBUS |
| @@ -1225,10 +1225,10 @@ extern bool pcie_ports_auto; | |||
| 1225 | #define pcie_ports_auto false | 1225 | #define pcie_ports_auto false |
| 1226 | #endif | 1226 | #endif |
| 1227 | 1227 | ||
| 1228 | #ifndef CONFIG_PCIEASPM | 1228 | #ifdef CONFIG_PCIEASPM |
| 1229 | static inline bool pcie_aspm_support_enabled(void) { return false; } | ||
| 1230 | #else | ||
| 1231 | bool pcie_aspm_support_enabled(void); | 1229 | bool pcie_aspm_support_enabled(void); |
| 1230 | #else | ||
| 1231 | static inline bool pcie_aspm_support_enabled(void) { return false; } | ||
| 1232 | #endif | 1232 | #endif |
| 1233 | 1233 | ||
| 1234 | #ifdef CONFIG_PCIEAER | 1234 | #ifdef CONFIG_PCIEAER |
| @@ -1239,15 +1239,15 @@ static inline void pci_no_aer(void) { } | |||
| 1239 | static inline bool pci_aer_available(void) { return false; } | 1239 | static inline bool pci_aer_available(void) { return false; } |
| 1240 | #endif | 1240 | #endif |
| 1241 | 1241 | ||
| 1242 | #ifndef CONFIG_PCIE_ECRC | 1242 | #ifdef CONFIG_PCIE_ECRC |
| 1243 | void pcie_set_ecrc_checking(struct pci_dev *dev); | ||
| 1244 | void pcie_ecrc_get_policy(char *str); | ||
| 1245 | #else | ||
| 1243 | static inline void pcie_set_ecrc_checking(struct pci_dev *dev) | 1246 | static inline void pcie_set_ecrc_checking(struct pci_dev *dev) |
| 1244 | { | 1247 | { |
| 1245 | return; | 1248 | return; |
| 1246 | } | 1249 | } |
| 1247 | static inline void pcie_ecrc_get_policy(char *str) {}; | 1250 | static inline void pcie_ecrc_get_policy(char *str) {}; |
| 1248 | #else | ||
| 1249 | void pcie_set_ecrc_checking(struct pci_dev *dev); | ||
| 1250 | void pcie_ecrc_get_policy(char *str); | ||
| 1251 | #endif | 1251 | #endif |
| 1252 | 1252 | ||
| 1253 | #define pci_enable_msi(pdev) pci_enable_msi_block(pdev, 1) | 1253 | #define pci_enable_msi(pdev) pci_enable_msi_block(pdev, 1) |
