Skip to contentSkip to conversation

of: Add stubs for of_get_next_child and of_get_next_available_child for !OF

PATCH New Alexander Shiyan 1 participant 1 message Jun 20, 2013 Device tree

lore
Share & tools
lore
#0 lore raw

PATCH v3 1/1 of: Add stubs for of_get_next_child and of_get_next_available_child for !OF

Patch adds an empty versions of of_get_next_child and of_get_next_available_child for non-OF builds.

---
 include/linux/of.h | 12 ++++++++++++
 1 file changed, 12 insertions(+)
include/linux/of.h +12 -0
index 1fd08ca..832b41a 100644
@@ -369,6 +369,18 @@ static inline bool of_have_populated_dt(void)
 #define for_each_child_of_node(parent, child) \
 	while (0)
 
+static inline struct device_node *of_get_next_child(
+	const struct device_node *node, struct device_node *prev)
+{
+	return NULL;
+}
+
+static inline struct device_node *of_get_next_available_child(
+	const struct device_node *node, struct device_node *prev)
+{
+	return NULL;
+}
+
 static inline struct device_node *of_get_child_by_name(
 					const struct device_node *node,
 					const char *name)
Signature · 1 line
1.8.1.5