]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/pci/pci.c
Merge branch 'omap-pool'
[linux-2.6-omap-h63xx.git] / drivers / pci / pci.c
index fe7ac2cea7c971a9737b5babdbc58b97338f60b7..16fd0d4c316655dbcfb8729f82a9aef5cabb7e8c 100644 (file)
@@ -593,7 +593,7 @@ EXPORT_SYMBOL_GPL(__pci_complete_power_transition);
  * @dev: PCI device to handle.
  * @state: PCI power state (D0, D1, D2, D3hot) to put the device into.
  *
- * Transition a device to a new power state, using the platform formware and/or
+ * Transition a device to a new power state, using the platform firmware and/or
  * the device's PCI PM registers.
  *
  * RETURN VALUE:
@@ -844,7 +844,7 @@ static int do_pci_enable_device(struct pci_dev *dev, int bars)
  */
 int pci_reenable_device(struct pci_dev *dev)
 {
-       if (atomic_read(&dev->enable_cnt))
+       if (pci_is_enabled(dev))
                return do_pci_enable_device(dev, (1 << PCI_NUM_RESOURCES) - 1);
        return 0;
 }
@@ -1042,7 +1042,7 @@ static void do_pci_disable_device(struct pci_dev *dev)
  */
 void pci_disable_enabled_device(struct pci_dev *dev)
 {
-       if (atomic_read(&dev->enable_cnt))
+       if (pci_is_enabled(dev))
                do_pci_disable_device(dev);
 }