devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] of: Add more stubs for non-OF builds
@ 2013-06-18 14:39 Alexander Shiyan
       [not found] ` <1371566362-9334-1-git-send-email-shc_work-JGs/UdohzUI@public.gmane.org>
  0 siblings, 1 reply; 3+ messages in thread
From: Alexander Shiyan @ 2013-06-18 14:39 UTC (permalink / raw)
  To: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ
  Cc: Grant Likely, Bryan Wu, Rob Herring,
	linux-leds-u79uwXL29TY76Z2rM5mHXA, Alexander Shiyan

Patch adds of_get_next_child and of_get_next_available_child
stubs for non-OF builds.

Signed-off-by: Alexander Shiyan <shc_work-JGs/UdohzUI@public.gmane.org>
---
 include/linux/of.h | 16 ++++++++++++++--
 1 file changed, 14 insertions(+), 2 deletions(-)

diff --git a/include/linux/of.h b/include/linux/of.h
index 1fd08ca..c086c1a 100644
--- a/include/linux/of.h
+++ b/include/linux/of.h
@@ -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;
-- 
1.8.1.5

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH v2] of: Add more stubs for non-OF builds
       [not found] ` <1371566362-9334-1-git-send-email-shc_work-JGs/UdohzUI@public.gmane.org>
@ 2013-07-20  5:31   ` Grant Likely
  2013-07-20 12:32     ` Alexander Shiyan
  0 siblings, 1 reply; 3+ messages in thread
From: Grant Likely @ 2013-07-20  5:31 UTC (permalink / raw)
  To: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ
  Cc: Bryan Wu, Rob Herring, linux-leds-u79uwXL29TY76Z2rM5mHXA,
	Alexander Shiyan

On Tue, 18 Jun 2013 18:39:22 +0400, Alexander Shiyan <shc_work-JGs/UdohzUI@public.gmane.org> wrote:
> Patch adds of_get_next_child and of_get_next_available_child
> stubs for non-OF builds.
> 
> Signed-off-by: Alexander Shiyan <shc_work-JGs/UdohzUI@public.gmane.org>
> ---
>  include/linux/of.h | 16 ++++++++++++++--
>  1 file changed, 14 insertions(+), 2 deletions(-)
> 
> diff --git a/include/linux/of.h b/include/linux/of.h
> index 1fd08ca..c086c1a 100644
> --- a/include/linux/of.h
> +++ b/include/linux/of.h
> @@ -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)
> +

Why is the for_each_child_of_node() getting moved?

g.

>  static inline int of_get_child_count(const struct device_node *np)
>  {
>  	return 0;
> -- 
> 1.8.1.5
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v2] of: Add more stubs for non-OF builds
  2013-07-20  5:31   ` Grant Likely
@ 2013-07-20 12:32     ` Alexander Shiyan
  0 siblings, 0 replies; 3+ messages in thread
From: Alexander Shiyan @ 2013-07-20 12:32 UTC (permalink / raw)
  To: Grant Likely
  Cc: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ, Bryan Wu, Rob Herring,
	linux-leds-u79uwXL29TY76Z2rM5mHXA

On Sat, 20 Jul 2013 06:31:11 +0100
Grant Likely <grant.likely-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org> wrote:

> On Tue, 18 Jun 2013 18:39:22 +0400, Alexander Shiyan <shc_work-JGs/UdohzUI@public.gmane.org> wrote:
> > Patch adds of_get_next_child and of_get_next_available_child
> > stubs for non-OF builds.
> > 
> > Signed-off-by: Alexander Shiyan <shc_work-JGs/UdohzUI@public.gmane.org>
> > ---
> >  include/linux/of.h | 16 ++++++++++++++--
> >  1 file changed, 14 insertions(+), 2 deletions(-)
> > 
> > diff --git a/include/linux/of.h b/include/linux/of.h
> > index 1fd08ca..c086c1a 100644
> > --- a/include/linux/of.h
> > +++ b/include/linux/of.h
> > @@ -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)
> > +
> 
> 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.

-- 
Alexander Shiyan <shc_work-JGs/UdohzUI@public.gmane.org>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-07-20 12:32 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-18 14:39 [PATCH v2] of: Add more stubs for non-OF builds Alexander Shiyan
     [not found] ` <1371566362-9334-1-git-send-email-shc_work-JGs/UdohzUI@public.gmane.org>
2013-07-20  5:31   ` Grant Likely
2013-07-20 12:32     ` Alexander Shiyan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).