summaryrefslogtreecommitdiff
path: root/drivers/pci/host/pci-mvebu.c
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@arm.linux.org.uk>2015-09-23 18:17:42 +0100
committerBjorn Helgaas <bhelgaas@google.com>2015-10-08 11:22:58 -0500
commit2aee2ed2474bcd66a628f18412826165cdca1b4c (patch)
tree11e046ccb5704ed71af90865c41454bd2dca5b27 /drivers/pci/host/pci-mvebu.c
parent7de36cd5742be100641684349cd7a70715b8cf8d (diff)
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: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Reviewed-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Diffstat (limited to 'drivers/pci/host/pci-mvebu.c')
-rw-r--r--drivers/pci/host/pci-mvebu.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/pci/host/pci-mvebu.c b/drivers/pci/host/pci-mvebu.c
index 0ed14f477bf8..d331d2664580 100644
--- a/drivers/pci/host/pci-mvebu.c
+++ b/drivers/pci/host/pci-mvebu.c
@@ -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",