diff options
author | Qinglang Miao <miaoqinglang@huawei.com> | 2020-07-28 10:28:17 +0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-08-05 17:51:51 -0700 |
commit | 0a95a6d1a4cd6e10e70f8a6c93dc2ecd02e7d6ab (patch) | |
tree | 9943bf986d3dd90e2d99acd4f88547b24891eb30 | |
parent | 17ec0a17e90f4b761025a6b80c8d458b9d5f9ddd (diff) |
sparc: use for_each_child_of_node() macro
Use for_each_child_of_node() macro instead of open coding it.
Signed-off-by: Qinglang Miao <miaoqinglang@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | arch/sparc/kernel/pci.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/arch/sparc/kernel/pci.c b/arch/sparc/kernel/pci.c index 5d45b6d766d6..9c2b720bfd20 100644 --- a/arch/sparc/kernel/pci.c +++ b/arch/sparc/kernel/pci.c @@ -552,9 +552,8 @@ static void pci_of_scan_bus(struct pci_pbm_info *pbm, pci_info(bus, "scan_bus[%pOF] bus no %d\n", node, bus->number); - child = NULL; prev_devfn = -1; - while ((child = of_get_next_child(node, child)) != NULL) { + for_each_child_of_node(node, child) { if (ofpci_verbose) pci_info(bus, " * %pOF\n", child); reg = of_get_property(child, "reg", ®len); |