Commit 342ea00f authored by Wei Yongjun's avatar Wei Yongjun Committed by Michael Ellerman

powerpc: use for_each_compatible_node() macro

Use for_each_compatible_node() macro instead of open coding it.
Signed-off-by: default avatarWei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: default avatarMichael Ellerman <michael@ellerman.id.au>
parent 8040bda3
...@@ -21,9 +21,7 @@ static int parport_pc_find_nonpci_ports (int autoirq, int autodma) ...@@ -21,9 +21,7 @@ static int parport_pc_find_nonpci_ports (int autoirq, int autodma)
int count = 0; int count = 0;
int virq; int virq;
for (np = NULL; (np = of_find_compatible_node(np, for_each_compatible_node(np, "parallel", "pnpPNP,400") {
"parallel",
"pnpPNP,400")) != NULL;) {
prop = of_get_property(np, "reg", &propsize); prop = of_get_property(np, "reg", &propsize);
if (!prop || propsize > 6*sizeof(u32)) if (!prop || propsize > 6*sizeof(u32))
continue; continue;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment