Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

powerpc: use for_each_compatible_node() macro

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>

authored by

Wei Yongjun and committed by
Michael Ellerman
342ea00f 8040bda3

+1 -3
+1 -3
arch/powerpc/include/asm/parport.h
··· 21 21 int count = 0; 22 22 int virq; 23 23 24 - for (np = NULL; (np = of_find_compatible_node(np, 25 - "parallel", 26 - "pnpPNP,400")) != NULL;) { 24 + for_each_compatible_node(np, "parallel", "pnpPNP,400") { 27 25 prop = of_get_property(np, "reg", &propsize); 28 26 if (!prop || propsize > 6*sizeof(u32)) 29 27 continue;