Skip to content

Commit

Permalink
PCI: mvebu: Use existing of_node pointer
Browse files Browse the repository at this point in the history
Use the existing "np" pointer instead of looking up dev->of_node again.  No
functional change intended.

Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
  • Loading branch information
Bjorn Helgaas committed Oct 12, 2016
1 parent 160b4e4 commit 96f6170
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/pci/host/pci-mvebu.c
Original file line number Diff line number Diff line change
@@ -1228,14 +1228,14 @@ static int mvebu_pcie_probe(struct platform_device *pdev)
return ret;
}

num = of_get_available_child_count(dev->of_node);
num = of_get_available_child_count(np);

pcie->ports = devm_kcalloc(dev, num, sizeof(*pcie->ports), GFP_KERNEL);
if (!pcie->ports)
return -ENOMEM;

i = 0;
for_each_available_child_of_node(dev->of_node, child) {
for_each_available_child_of_node(np, child) {
struct mvebu_pcie_port *port = &pcie->ports[i];

ret = mvebu_pcie_parse_port(pcie, port, child);

0 comments on commit 96f6170

Please sign in to comment.