aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/of.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/of.h')
-rw-r--r--include/linux/of.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/include/linux/of.h b/include/linux/of.h
index f9279578b616..276c546980d8 100644
--- a/include/linux/of.h
+++ b/include/linux/of.h
@@ -228,6 +228,19 @@ static inline int of_get_child_count(const struct device_node *np)
return num;
}
+static inline int of_get_available_child_count(const struct device_node *np)
+{
+ struct device_node *child;
+ int num = 0;
+
+ for_each_available_child_of_node(np, child)
+ num++;
+
+ return num;
+}
+
+/* cache lookup */
+extern struct device_node *of_find_next_cache_node(const struct device_node *);
extern struct device_node *of_find_node_with_property(
struct device_node *from, const char *prop_name);
#define for_each_node_with_property(dn, prop_name) \
@@ -382,6 +395,11 @@ static inline int of_get_child_count(const struct device_node *np)
return 0;
}
+static inline int of_get_available_child_count(const struct device_node *np)
+{
+ return 0;
+}
+
static inline int of_device_is_compatible(const struct device_node *device,
const char *name)
{