Skip to content

Commit

Permalink
powerpc: use for_each_compatible_node() macro
Browse files Browse the repository at this point in the history
Use for_each_compatible_node() macro instead of open coding it.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
  • Loading branch information
Wei Yongjun authored and Michael Ellerman committed Apr 18, 2013
1 parent 8040bda commit 342ea00
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions arch/powerpc/include/asm/parport.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,7 @@ static int parport_pc_find_nonpci_ports (int autoirq, int autodma)
int count = 0;
int virq;

for (np = NULL; (np = of_find_compatible_node(np,
"parallel",
"pnpPNP,400")) != NULL;) {
for_each_compatible_node(np, "parallel", "pnpPNP,400") {
prop = of_get_property(np, "reg", &propsize);
if (!prop || propsize > 6*sizeof(u32))
continue;
Expand Down

0 comments on commit 342ea00

Please sign in to comment.