diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-04-07 20:24:19 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-04-07 20:24:19 +0200 |
commit | 8e2c4f2844c0e8dcdfe312e5f2204854ca8532c6 (patch) | |
tree | f846fcbf6b756b76834e06e412a8248bbfb55b32 /include | |
parent | Merge branch 'for-linus' of git://git.kernel.dk/linux-2.6-block (diff) | |
parent | PCI: pci_slot: grab refcount on slot's bus (diff) | |
download | linux-8e2c4f2844c0e8dcdfe312e5f2204854ca8532c6.tar.xz linux-8e2c4f2844c0e8dcdfe312e5f2204854ca8532c6.zip |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6:
PCI: pci_slot: grab refcount on slot's bus
PCI Hotplug: acpiphp: grab refcount on p2p subordinate bus
PCI: allow PCI core hotplug to remove PCI root bus
PCI: Fix oops in pci_vpd_truncate
PCI: don't corrupt enable_cnt when doing manual resource alignment
PCI: annotate pci_rescan_bus as __ref, not __devinit
PCI-IOV: fix missing kernel-doc
PCI: Setup disabled bridges even if buses are added
PCI: SR-IOV quirk for Intel 82576 NIC
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/pci.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/pci.h b/include/linux/pci.h index a7fe4bbd7ff1..72698d89e767 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h @@ -674,6 +674,11 @@ int __must_check pci_reenable_device(struct pci_dev *); int __must_check pcim_enable_device(struct pci_dev *pdev); void pcim_pin_device(struct pci_dev *pdev); +static inline int pci_is_enabled(struct pci_dev *pdev) +{ + return (atomic_read(&pdev->enable_cnt) > 0); +} + static inline int pci_is_managed(struct pci_dev *pdev) { return pdev->is_managed; |