diff options
-rw-r--r-- | include/linux/pci.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/linux/pci.h b/include/linux/pci.h index 15f37f102dd3..2891c3d3e51a 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h | |||
@@ -1317,5 +1317,16 @@ static inline int pci_pcie_cap(struct pci_dev *dev) | |||
1317 | return dev->pcie_cap; | 1317 | return dev->pcie_cap; |
1318 | } | 1318 | } |
1319 | 1319 | ||
1320 | /** | ||
1321 | * pci_is_pcie - check if the PCI device is PCI Express capable | ||
1322 | * @dev: PCI device | ||
1323 | * | ||
1324 | * Retrun true if the PCI device is PCI Express capable, false otherwise. | ||
1325 | */ | ||
1326 | static inline bool pci_is_pcie(struct pci_dev *dev) | ||
1327 | { | ||
1328 | return !!pci_pcie_cap(dev); | ||
1329 | } | ||
1330 | |||
1320 | #endif /* __KERNEL__ */ | 1331 | #endif /* __KERNEL__ */ |
1321 | #endif /* LINUX_PCI_H */ | 1332 | #endif /* LINUX_PCI_H */ |