]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - include/linux/of.h
Merge remote-tracking branch 'grant/devicetree/next' into for-next
[karo-tx-linux.git] / include / linux / of.h
index 374e035361353cbda6a37c9a58218fd99cf8e044..f9279578b6167f16b602bf53f4099dd602b95cbe 100644 (file)
@@ -136,7 +136,9 @@ static inline unsigned long of_read_ulong(const __be32 *cell, int size)
        return of_read_number(cell, size);
 }
 
+#if defined(CONFIG_SPARC)
 #include <asm/prom.h>
+#endif
 
 /* Default #address and #size cells.  Allow arch asm/prom.h to override */
 #if !defined(OF_ROOT_NODE_ADDR_CELLS_DEFAULT)
@@ -365,6 +367,9 @@ static inline bool of_have_populated_dt(void)
 #define for_each_child_of_node(parent, child) \
        while (0)
 
+#define for_each_available_child_of_node(parent, child) \
+       while (0)
+
 static inline struct device_node *of_get_child_by_name(
                                        const struct device_node *node,
                                        const char *name)
@@ -535,13 +540,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
 
 /**