of: Add more stubs for non-OF builds
PATCH v2 1/1 of: Add more stubs for non-OF builds
Patch adds of_get_next_child and of_get_next_available_child stubs for non-OF builds.
--- include/linux/of.h | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-)
include/linux/of.h +14 -2
@@ -366,8 +366,17 @@ static inline bool of_have_populated_dt(void)return false; } -#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,
@@ -376,6 +385,9 @@ static inline struct device_node *of_get_child_by_name(return NULL ; } +#define for_each_child_of_node (parent, child) \ + while (0) +static inline int of_get_child_count (const struct device_node *np) {return 0 ;
Signature · 1 line
1.8.1.5
A message that is not in the archive (sent off-list or not yet received): 1371566362-9334-1-git-send-email-shc_work-JGs/[email protected]
Quoted 33 lines · Alexander Shiyan
Patch adds
of_get_next_childandof_get_next_available_childstubs for non-OF builds.Signed-off-by Alexander Shiyan <shc_work-JGs/[email protected]>--- include/linux/of.h | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-)include/linux/of.h +11
-2@@ -366,8 +366,17 @@ static inline bool of_have_populated_dt(void)return false; } -#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,
include/linux/of.h static inline struct device_node *of_get_child_by_name( · line 390
Quoted 6 lines
include/linux/of.h +3
-0@@ -376,6 +385,9 @@ static inline struct device_node *of_get_child_by_name(return NULL ; } +#define for_each_child_of_node (parent, child) \ + while (0) +
Why is the for_each_child_of_node() getting moved?
g.
Quoted 6 lines
include/linux/of.h +0
-0static inline int of_get_child_count (const struct device_node *np) {return 0 ;Signature · 1 line
1.8.1.5
Quoted 37 lines · On Sat, 20 Jul 2013 06:31:11 +0100 Grant Likely…
Quoted 36 lines · Alexander Shiyan
Patch adds
of_get_next_childandof_get_next_available_childstubs for non-OF builds.Signed-off-by Alexander Shiyan <shc_work-JGs/[email protected]>--- include/linux/of.h | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-)include/linux/of.h +11
-2@@ -366,8 +366,17 @@ static inline bool of_have_populated_dt(void)return false; } -#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,@@ -376,6 +385,9 @@ static inline struct device_node *of_get_child_by_name(return NULL ; }
Quoted 5 lines
include/linux/of.h static inline struct device_node *of_get_child_by_name( · line 390
Quoted 3 lines
include/linux/of.h +3
-0+#define for_each_child_of_node (parent, child) \ + while (0) +Why is the
for_each_child_of_node()getting moved?
Please forget this patch, this is no longer needed. A move was to preserve the sort order for "OF" and "non-OF". Thanks.
Signature · 1 line
Alexander Shiyan <shc_work-JGs/[email protected]>