diff options
author | Ethan Zhao <ethan.zhao@oracle.com> | 2014-09-08 22:21:25 -0400 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2014-09-16 18:12:27 -0400 |
commit | ce0529843a505d09f5809a7db6288d2f038f64c4 (patch) | |
tree | e10b791b38c50caf3932a6eed6cdd5efa6a026c7 /include/linux/pci.h | |
parent | 11e42532ada3174840196e8f23df29cb91c44b50 (diff) |
PCI: Add device flag helper functions
Add helper functions to hide direct device flag operations:
void pci_set_dev_assigned(struct pci_dev *dev);
void pci_clear_dev_assigned(struct pci_dev *dev);
bool pci_is_dev_assigned(struct pci_dev *dev);
Signed-off-by: Ethan Zhao <ethan.zhao@oracle.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Diffstat (limited to 'include/linux/pci.h')
-rw-r--r-- | include/linux/pci.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/include/linux/pci.h b/include/linux/pci.h index 61978a460841..92c131efec1c 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h | |||
@@ -1839,4 +1839,17 @@ int pci_for_each_dma_alias(struct pci_dev *pdev, | |||
1839 | */ | 1839 | */ |
1840 | struct pci_dev *pci_find_upstream_pcie_bridge(struct pci_dev *pdev); | 1840 | struct pci_dev *pci_find_upstream_pcie_bridge(struct pci_dev *pdev); |
1841 | 1841 | ||
1842 | /* helper functions for operation of device flag */ | ||
1843 | static inline void pci_set_dev_assigned(struct pci_dev *pdev) | ||
1844 | { | ||
1845 | pdev->dev_flags |= PCI_DEV_FLAGS_ASSIGNED; | ||
1846 | } | ||
1847 | static inline void pci_clear_dev_assigned(struct pci_dev *pdev) | ||
1848 | { | ||
1849 | pdev->dev_flags &= ~PCI_DEV_FLAGS_ASSIGNED; | ||
1850 | } | ||
1851 | static inline bool pci_is_dev_assigned(struct pci_dev *pdev) | ||
1852 | { | ||
1853 | return (pdev->dev_flags & PCI_DEV_FLAGS_ASSIGNED) == PCI_DEV_FLAGS_ASSIGNED; | ||
1854 | } | ||
1842 | #endif /* LINUX_PCI_H */ | 1855 | #endif /* LINUX_PCI_H */ |