Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 930067e2 authored by Yijing Wang's avatar Yijing Wang Committed by Bjorn Helgaas
Browse files

PCI: pciehp: Use pci_is_bridge() to simplify code



Use pci_is_bridge() to simplify code.  No functional change.

Requires: 326c1cda PCI: Rename pci_is_bridge() to pci_has_subordinate()
Requires: 1c86438c PCI: Add new pci_is_bridge() interface
Signed-off-by: default avatarYijing Wang <wangyijing@huawei.com>
Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
parent c7a071f6
Loading
Loading
Loading
Loading
+1 −2
Original line number Original line Diff line number Diff line
@@ -62,8 +62,7 @@ int pciehp_configure_device(struct slot *p_slot)
	}
	}


	list_for_each_entry(dev, &parent->devices, bus_list)
	list_for_each_entry(dev, &parent->devices, bus_list)
		if ((dev->hdr_type == PCI_HEADER_TYPE_BRIDGE) ||
		if (pci_is_bridge(dev))
				(dev->hdr_type == PCI_HEADER_TYPE_CARDBUS))
			pci_hp_add_bridge(dev);
			pci_hp_add_bridge(dev);


	pci_assign_unassigned_bridge_resources(bridge);
	pci_assign_unassigned_bridge_resources(bridge);