Skip to content

Commit 0a95a6d

Browse files
Qinglang Miaodavem330
authored andcommitted
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>
1 parent 17ec0a1 commit 0a95a6d

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

arch/sparc/kernel/pci.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -552,9 +552,8 @@ static void pci_of_scan_bus(struct pci_pbm_info *pbm,
552552
pci_info(bus, "scan_bus[%pOF] bus no %d\n",
553553
node, bus->number);
554554

555-
child = NULL;
556555
prev_devfn = -1;
557-
while ((child = of_get_next_child(node, child)) != NULL) {
556+
for_each_child_of_node(node, child) {
558557
if (ofpci_verbose)
559558
pci_info(bus, " * %pOF\n", child);
560559
reg = of_get_property(child, "reg", &reglen);

0 commit comments

Comments
 (0)