提交 96f61707 编写于 作者: B Bjorn Helgaas

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: NBjorn Helgaas <bhelgaas@google.com>
上级 160b4e41
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册