Merge tag 'devicetree-for-6.9' of git://git.kernel.org/pub/scm/linux/kernel/git/robh...
[sfrench/cifs-2.6.git] / include / linux / of.h
index 4677e50d52b7e4d09675785d9af31e6064367133..4f24e33d67a602570306659bf1984e0863f2274f 100644 (file)
@@ -291,6 +291,8 @@ extern struct device_node *of_get_next_child(const struct device_node *node,
                                             struct device_node *prev);
 extern struct device_node *of_get_next_available_child(
        const struct device_node *node, struct device_node *prev);
+extern struct device_node *of_get_next_reserved_child(
+       const struct device_node *node, struct device_node *prev);
 
 extern struct device_node *of_get_compatible_child(const struct device_node *parent,
                                        const char *compatible);
@@ -535,6 +537,12 @@ static inline struct device_node *of_get_next_available_child(
        return NULL;
 }
 
+static inline struct device_node *of_get_next_reserved_child(
+       const struct device_node *node, struct device_node *prev)
+{
+       return NULL;
+}
+
 static inline struct device_node *of_find_node_with_property(
        struct device_node *from, const char *prop_name)
 {
@@ -1430,6 +1438,9 @@ static inline int of_property_read_s32(const struct device_node *np,
 #define for_each_available_child_of_node(parent, child) \
        for (child = of_get_next_available_child(parent, NULL); child != NULL; \
             child = of_get_next_available_child(parent, child))
+#define for_each_reserved_child_of_node(parent, child)                 \
+       for (child = of_get_next_reserved_child(parent, NULL); child != NULL; \
+            child = of_get_next_reserved_child(parent, child))
 
 #define for_each_available_child_of_node_scoped(parent, child) \
        for (struct device_node *child __free(device_node) =            \