aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/of.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/of.h')
-rw-r--r--include/linux/of.h15
1 files changed, 10 insertions, 5 deletions
diff --git a/include/linux/of.h b/include/linux/of.h
index 42c2a58328c1..5919ee33f2b7 100644
--- a/include/linux/of.h
+++ b/include/linux/of.h
@@ -21,6 +21,7 @@
21#include <linux/kref.h> 21#include <linux/kref.h>
22#include <linux/mod_devicetable.h> 22#include <linux/mod_devicetable.h>
23#include <linux/spinlock.h> 23#include <linux/spinlock.h>
24#include <linux/topology.h>
24 25
25#include <asm/byteorder.h> 26#include <asm/byteorder.h>
26#include <asm/errno.h> 27#include <asm/errno.h>
@@ -158,11 +159,6 @@ static inline unsigned long of_read_ulong(const __be32 *cell, int size)
158 159
159#define OF_BAD_ADDR ((u64)-1) 160#define OF_BAD_ADDR ((u64)-1)
160 161
161#ifndef of_node_to_nid
162static inline int of_node_to_nid(struct device_node *np) { return -1; }
163#define of_node_to_nid of_node_to_nid
164#endif
165
166static inline const char* of_node_full_name(struct device_node *np) 162static inline const char* of_node_full_name(struct device_node *np)
167{ 163{
168 return np ? np->full_name : "<no-node>"; 164 return np ? np->full_name : "<no-node>";
@@ -427,6 +423,15 @@ static inline int of_machine_is_compatible(const char *compat)
427 while (0) 423 while (0)
428#endif /* CONFIG_OF */ 424#endif /* CONFIG_OF */
429 425
426#ifndef of_node_to_nid
427static inline int of_node_to_nid(struct device_node *np)
428{
429 return numa_node_id();
430}
431
432#define of_node_to_nid of_node_to_nid
433#endif
434
430/** 435/**
431 * of_property_read_bool - Findfrom a property 436 * of_property_read_bool - Findfrom a property
432 * @np: device node from which the property value is to be read. 437 * @np: device node from which the property value is to be read.