Merge tag 'devicetree-for-4.7' of git://git.kernel.org/pub/scm/linux/kernel/git/robh...
[sfrench/cifs-2.6.git] / include / linux / of.h
index 71e1c35a59602be43b27533c5dd6600e40655cff..c7292e8ea080118b9d09542a875b95ebbddc31b3 100644 (file)
@@ -150,7 +150,7 @@ void of_core_init(void);
 
 static inline bool is_of_node(struct fwnode_handle *fwnode)
 {
-       return fwnode && fwnode->type == FWNODE_OF;
+       return !IS_ERR_OR_NULL(fwnode) && fwnode->type == FWNODE_OF;
 }
 
 static inline struct device_node *to_of_node(struct fwnode_handle *fwnode)
@@ -735,6 +735,15 @@ static inline int of_node_to_nid(struct device_node *device)
 }
 #endif
 
+#ifdef CONFIG_OF_NUMA
+extern int of_numa_init(void);
+#else
+static inline int of_numa_init(void)
+{
+       return -ENOSYS;
+}
+#endif
+
 static inline struct device_node *of_find_matching_node(
        struct device_node *from,
        const struct of_device_id *matches)