PCI: use pci_is_root_bus() in pci_common_swizzle()
authorKenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Tue, 26 May 2009 07:08:36 +0000 (16:08 +0900)
committerJesse Barnes <jbarnes@virtuousgeek.org>
Tue, 16 Jun 2009 21:29:32 +0000 (14:29 -0700)
Use pci_is_root_bus() in pci_common_swizzle() for checking if the pci
bus is root, for code consistency.

Reviewed-by: Alex Chiang <achiang@hp.com>
Reviewed-by: Grant Grundler <grundler@parisc-linux.org>
Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
drivers/pci/pci.c

index 70b3b44..8ea911e 100644 (file)
@@ -1549,7 +1549,7 @@ u8 pci_common_swizzle(struct pci_dev *dev, u8 *pinp)
 {
        u8 pin = *pinp;
 
-       while (dev->bus->parent) {
+       while (!pci_is_root_bus(dev->bus)) {
                pin = pci_swizzle_interrupt_pin(dev, pin);
                dev = dev->bus->self;
        }