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

Commit 2aee2ed2 authored by Russell King's avatar Russell King Committed by Bjorn Helgaas
Browse files

PCI: mvebu: Use for_each_available_child_of_node() to walk child nodes



Rather than using for_each_child_of_node() and testing each child's
availability, use the for_each_available_child_of_node() helper instead.

Tested-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> (Armada XP GP)
Tested-by: Andrew Lunn <andrew@lunn.ch> (Kirkwood DIR665)
Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
Reviewed-by: default avatarThomas Petazzoni <thomas.petazzoni@free-electrons.com>
parent 7de36cd5
Loading
Loading
Loading
Loading
+1 −4
Original line number Diff line number Diff line
@@ -978,13 +978,10 @@ static int mvebu_pcie_probe(struct platform_device *pdev)
		return -ENOMEM;

	i = 0;
	for_each_child_of_node(pdev->dev.of_node, child) {
	for_each_available_child_of_node(pdev->dev.of_node, child) {
		struct mvebu_pcie_port *port = &pcie->ports[i];
		enum of_gpio_flags flags;

		if (!of_device_is_available(child))
			continue;

		port->pcie = pcie;

		if (of_property_read_u32(child, "marvell,pcie-port",