summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorMichael Ellerman <michael@ellerman.id.au>2007-06-04 23:00:02 +1000
committerPaul Mackerras <paulus@samba.org>2007-06-25 17:02:08 +1000
commite3855fa5540617877907ca61c36d28e18d0f2473 (patch)
tree7a1fb7d81837bcedfaba80f22aec724fb591e875 /include
parentee51de5645edee4124db6a479d2e135ebe436748 (diff)
downloadblackbird-op-linux-e3855fa5540617877907ca61c36d28e18d0f2473.tar.gz
blackbird-op-linux-e3855fa5540617877907ca61c36d28e18d0f2473.zip
[POWERPC] Add for_each_compatible_node()
Signed-off-by: Michael Ellerman <michael@ellerman.id.au> Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'include')
-rw-r--r--include/asm-powerpc/prom.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/asm-powerpc/prom.h b/include/asm-powerpc/prom.h
index 6845af93ba91..1122a9278afd 100644
--- a/include/asm-powerpc/prom.h
+++ b/include/asm-powerpc/prom.h
@@ -124,6 +124,9 @@ extern struct device_node *of_find_node_by_type(struct device_node *from,
dn = of_find_node_by_type(dn, type))
extern struct device_node *of_find_compatible_node(struct device_node *from,
const char *type, const char *compat);
+#define for_each_compatible_node(dn, type, compatible) \
+ for (dn = of_find_compatible_node(NULL, type, compatible); dn; \
+ dn = of_find_compatible_node(dn, type, compatible))
extern struct device_node *of_find_node_by_path(const char *path);
extern struct device_node *of_find_node_by_phandle(phandle handle);
extern struct device_node *of_find_all_nodes(struct device_node *prev);
OpenPOWER on IntegriCloud