PCI: rpaphp: Use pci_is_bridge() to simplify code
authorYijing Wang <wangyijing@huawei.com>
Sun, 4 May 2014 04:23:43 +0000 (12:23 +0800)
committerBjorn Helgaas <bhelgaas@google.com>
Tue, 27 May 2014 20:57:55 +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: Benjamin Herrenschmidt <benh@kernel.crashing.org>
drivers/pci/hotplug/rpadlpar_core.c

index 4fcdeed..7660232 100644 (file)
@@ -157,8 +157,7 @@ static void dlpar_pci_add_bus(struct device_node *dn)
        }
 
        /* Scan below the new bridge */
-       if (dev->hdr_type == PCI_HEADER_TYPE_BRIDGE ||
-           dev->hdr_type == PCI_HEADER_TYPE_CARDBUS)
+       if (pci_is_bridge(dev))
                of_scan_pci_bridge(dev);
 
        /* Map IO space for child bus, which may or may not succeed */