aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci/pci.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-04-07 14:24:19 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2009-04-07 14:24:19 -0400
commit8e2c4f2844c0e8dcdfe312e5f2204854ca8532c6 (patch)
treef846fcbf6b756b76834e06e412a8248bbfb55b32 /drivers/pci/pci.c
parent6a5d263866d699ebf6843105497afc86ee53de5b (diff)
parent72800360fdd782eda3489e555adf3b6b3abc064a (diff)
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 'drivers/pci/pci.c')
-rw-r--r--drivers/pci/pci.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
index 445fb6f7ea3f..16fd0d4c3166 100644
--- a/drivers/pci/pci.c
+++ b/drivers/pci/pci.c
@@ -844,7 +844,7 @@ static int do_pci_enable_device(struct pci_dev *dev, int bars)
844 */ 844 */
845int pci_reenable_device(struct pci_dev *dev) 845int pci_reenable_device(struct pci_dev *dev)
846{ 846{
847 if (atomic_read(&dev->enable_cnt)) 847 if (pci_is_enabled(dev))
848 return do_pci_enable_device(dev, (1 << PCI_NUM_RESOURCES) - 1); 848 return do_pci_enable_device(dev, (1 << PCI_NUM_RESOURCES) - 1);
849 return 0; 849 return 0;
850} 850}
@@ -1042,7 +1042,7 @@ static void do_pci_disable_device(struct pci_dev *dev)
1042 */ 1042 */
1043void pci_disable_enabled_device(struct pci_dev *dev) 1043void pci_disable_enabled_device(struct pci_dev *dev)
1044{ 1044{
1045 if (atomic_read(&dev->enable_cnt)) 1045 if (pci_is_enabled(dev))
1046 do_pci_disable_device(dev); 1046 do_pci_disable_device(dev);
1047} 1047}
1048 1048