From: Yijing Wang Date: Sun, 4 May 2014 04:23:44 +0000 (+0800) Subject: PCI: shpchp: Use pci_is_bridge() to simplify code X-Git-Tag: firefly_0821_release~176^2~3767^2~6^3~4 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=087cfa93e0fb5f06c0e976e6f468ffedc83b3223;p=firefly-linux-kernel-4.4.55.git PCI: shpchp: Use pci_is_bridge() to simplify code 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 Signed-off-by: Bjorn Helgaas --- diff --git a/drivers/pci/hotplug/shpchp_pci.c b/drivers/pci/hotplug/shpchp_pci.c index 2bf69fe1926c..ea8ad313275c 100644 --- a/drivers/pci/hotplug/shpchp_pci.c +++ b/drivers/pci/hotplug/shpchp_pci.c @@ -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); }