]> err.no Git - linux-2.6/commitdiff
[IA64] Fix pci.c kernel compilation breakage.
authorPeter Chubb <peterc@gelato.unsw.edu.au>
Tue, 5 Dec 2006 01:25:31 +0000 (12:25 +1100)
committerTony Luck <tony.luck@intel.com>
Wed, 6 Dec 2006 22:13:38 +0000 (14:13 -0800)
The recent change to convert the is_enabled flag in the PCI device to an
atomic count broke the IA64 compilation.

As pcibios_disable_device is only ever called if the reference count
is zero, convert the if to a BUG_ON.

Signed-off-by: Peter Chubb <peterc@gelato.unsw.edu.au>
Signed-off-by: Tony Luck <tony.luck@intel.com>
arch/ia64/pci/pci.c

index f4edfbf27134e5e0c19432f750173ae1932d34f8..eb92cef9cd0de15190d303b0d076c77c480e2944 100644 (file)
@@ -564,8 +564,8 @@ pcibios_enable_device (struct pci_dev *dev, int mask)
 void
 pcibios_disable_device (struct pci_dev *dev)
 {
-       if (dev->is_enabled)
-               acpi_pci_irq_disable(dev);
+       BUG_ON(atomic_read(&dev->enable_cnt));
+       acpi_pci_irq_disable(dev);
 }
 
 void