From adce981d2449004dfcea432d48a1a57556f0c994 Mon Sep 17 00:00:00 2001 From: Antony Pavlov Date: Wed, 6 Jul 2016 23:38:25 +0300 Subject: of: base: import of_get_cpu_node() from linux-v4.7-rc2 Signed-off-by: Antony Pavlov Signed-off-by: Sascha Hauer --- include/of.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'include') diff --git a/include/of.h b/include/of.h index 8c8f57a7cc..ed6e870473 100644 --- a/include/of.h +++ b/include/of.h @@ -111,6 +111,7 @@ extern struct property *of_find_property(const struct device_node *np, const char *name, int *lenp); extern const void *of_get_property(const struct device_node *np, const char *name, int *lenp); +extern struct device_node *of_get_cpu_node(int cpu, unsigned int *thread); extern int of_set_property(struct device_node *node, const char *p, const void *val, int len, int create); @@ -347,6 +348,12 @@ static inline const void *of_get_property(const struct device_node *np, return NULL; } +static inline struct device_node *of_get_cpu_node(int cpu, + unsigned int *thread) +{ + return NULL; +} + static inline int of_set_property(struct device_node *node, const char *p, const void *val, int len, int create) { @@ -639,6 +646,9 @@ static inline struct device_node *of_find_node_by_path_or_alias( #define for_each_node_by_name(dn, name) \ for (dn = of_find_node_by_name(NULL, name); dn; \ dn = of_find_node_by_name(dn, name)) +#define for_each_node_by_type(dn, type) \ + for (dn = of_find_node_by_type(NULL, type); dn; \ + dn = of_find_node_by_type(dn, type)) #define for_each_node_by_name_from(dn, root, name) \ for (dn = of_find_node_by_name(root, name); dn; \ dn = of_find_node_by_name(dn, name)) -- cgit v1.2.3