|
@@ -534,13 +534,10 @@ static inline const char *of_prop_next_string(struct property *prop,
|
|
|
#define of_match_node(_matches, _node) NULL
|
|
|
#endif /* CONFIG_OF */
|
|
|
|
|
|
-#ifndef of_node_to_nid
|
|
|
-static inline int of_node_to_nid(struct device_node *np)
|
|
|
-{
|
|
|
- return numa_node_id();
|
|
|
-}
|
|
|
-
|
|
|
-#define of_node_to_nid of_node_to_nid
|
|
|
+#if defined(CONFIG_OF) && defined(CONFIG_NUMA)
|
|
|
+extern int of_node_to_nid(struct device_node *np);
|
|
|
+#else
|
|
|
+static inline int of_node_to_nid(struct device_node *device) { return 0; }
|
|
|
#endif
|
|
|
|
|
|
/**
|