aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/of.h
diff options
context:
space:
mode:
authorGrant Likely <grant.likely@secretlab.ca>2010-07-23 22:11:18 -0400
committerGrant Likely <grant.likely@secretlab.ca>2010-07-30 02:03:58 -0400
commit559e2b7ee7a1c7753d534abcb2742a4775339293 (patch)
tree28948fea73fcd9706d893f0f11c77861ed9ddca2 /include/linux/of.h
parentc6601225380088018ae93df2ba7f0bb65334d63b (diff)
of: Provide default of_node_to_nid() implementation.
of_node_to_nid() is only relevant in a few architectures. Don't force everyone to implement it anyway. Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Diffstat (limited to 'include/linux/of.h')
-rw-r--r--include/linux/of.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/of.h b/include/linux/of.h
index b0756f33249e..cad7cf0ab278 100644
--- a/include/linux/of.h
+++ b/include/linux/of.h
@@ -146,6 +146,11 @@ static inline unsigned long of_read_ulong(const __be32 *cell, int size)
146 146
147#define OF_BAD_ADDR ((u64)-1) 147#define OF_BAD_ADDR ((u64)-1)
148 148
149#ifndef of_node_to_nid
150static inline int of_node_to_nid(struct device_node *np) { return -1; }
151#define of_node_to_nid of_node_to_nid
152#endif
153
149extern struct device_node *of_find_node_by_name(struct device_node *from, 154extern struct device_node *of_find_node_by_name(struct device_node *from,
150 const char *name); 155 const char *name);
151#define for_each_node_by_name(dn, name) \ 156#define for_each_node_by_name(dn, name) \