summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBjorn Helgaas <bhelgaas@google.com>2016-10-11 23:19:05 -0500
committerBjorn Helgaas <bhelgaas@google.com>2016-10-11 23:19:05 -0500
commit96f61707f26a5dcd0631b5533cde0fc4d522d133 (patch)
treeeb680c6bb81c4a1aaedbcaf032fbe6733962bc41
parent160b4e418909585b8821191cffc34c1a95462217 (diff)
downloadop-kernel-dev-96f61707f26a5dcd0631b5533cde0fc4d522d133.zip
op-kernel-dev-96f61707f26a5dcd0631b5533cde0fc4d522d133.tar.gz
PCI: mvebu: Use existing of_node pointer
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>
-rw-r--r--drivers/pci/host/pci-mvebu.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/pci/host/pci-mvebu.c b/drivers/pci/host/pci-mvebu.c
index 2515200..45a89d9 100644
--- a/drivers/pci/host/pci-mvebu.c
+++ b/drivers/pci/host/pci-mvebu.c
@@ -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);
OpenPOWER on IntegriCloud