sparc/PCI: Use pci_is_bridge() to simplify code
authorYijing Wang <wangyijing@huawei.com>
Sun, 4 May 2014 04:23:42 +0000 (12:23 +0800)
committerBjorn Helgaas <bhelgaas@google.com>
Tue, 27 May 2014 20:57:47 +0000 (14:57 -0600)
Use pci_is_bridge() to simplify code.  No functional change.

Requires: 326c1cdae741 PCI: Rename pci_is_bridge() to pci_has_subordinate()
Requires: 1c86438c9423 PCI: Add new pci_is_bridge() interface
Signed-off-by: Yijing Wang <wangyijing@huawei.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: David S. Miller <davem@davemloft.net>
arch/sparc/kernel/pci.c

index 1555bbcae1eee617fecd7cbecaa78eb5d6ab2ca8..857ad77df9c0efa46fa21038cad0878968c4a644 100644 (file)
@@ -543,8 +543,7 @@ static void pci_of_scan_bus(struct pci_pbm_info *pbm,
                        printk("PCI: dev header type: %x\n",
                               dev->hdr_type);
 
-               if (dev->hdr_type == PCI_HEADER_TYPE_BRIDGE ||
-                   dev->hdr_type == PCI_HEADER_TYPE_CARDBUS)
+               if (pci_is_bridge(dev))
                        of_scan_pci_bridge(pbm, child, dev);
        }
 }