PCI: shpchp: Use pci_is_bridge() to simplify code
authorYijing Wang <wangyijing@huawei.com>
Sun, 4 May 2014 04:23:44 +0000 (12:23 +0800)
committerBjorn Helgaas <bhelgaas@google.com>
Tue, 27 May 2014 20:58:01 +0000 (14:58 -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>
drivers/pci/hotplug/shpchp_pci.c

index 2bf69fe1926c6b503283c43b954779ceaf2ea1d7..ea8ad313275c626b21a3fb5ec605c1d55f9bcce8 100644 (file)
@@ -64,8 +64,7 @@ int __ref shpchp_configure_device(struct slot *p_slot)
        list_for_each_entry(dev, &parent->devices, bus_list) {
                if (PCI_SLOT(dev->devfn) != p_slot->device)
                        continue;
-               if ((dev->hdr_type == PCI_HEADER_TYPE_BRIDGE) ||
-                   (dev->hdr_type == PCI_HEADER_TYPE_CARDBUS))
+               if (pci_is_bridge(dev))
                        pci_hp_add_bridge(dev);
        }