Re: [PATCH] of: Create function for counting number of phandles in a property

2013-02-12 Thread Grant Likely
On Mon, 11 Feb 2013 12:26:15 +0100, Andreas Larsson wrote: > On 2013-02-11 00:58, Grant Likely wrote: > > diff --git a/drivers/of/base.c b/drivers/of/base.c > > index 2390ddb..e1120a2 100644 > > --- a/drivers/of/base.c > > +++ b/drivers/of/base.c > > @@ -1025,12 +1025,13 @@

Re: [PATCH] of: Create function for counting number of phandles in a property

2013-02-12 Thread Grant Likely
On Tue, 12 Feb 2013 10:18:10 +0100, Andreas Larsson wrote: > On 2013-02-11 00:58, Grant Likely wrote: > > This patch creates of_count_phandle_with_args(), a new function for > > counting the number of phandle+argument tuples in a given property. This > > is better than the existing method of

Re: [PATCH] of: Create function for counting number of phandles in a property

2013-02-12 Thread Andreas Larsson
On 2013-02-11 00:58, Grant Likely wrote: This patch creates of_count_phandle_with_args(), a new function for counting the number of phandle+argument tuples in a given property. This is better than the existing method of parsing each phandle individually until parsing fails which is a horribly

Re: [PATCH] of: Create function for counting number of phandles in a property

2013-02-12 Thread Andreas Larsson
On 2013-02-11 00:58, Grant Likely wrote: This patch creates of_count_phandle_with_args(), a new function for counting the number of phandle+argument tuples in a given property. This is better than the existing method of parsing each phandle individually until parsing fails which is a horribly

Re: [PATCH] of: Create function for counting number of phandles in a property

2013-02-12 Thread Grant Likely
On Tue, 12 Feb 2013 10:18:10 +0100, Andreas Larsson andr...@gaisler.com wrote: On 2013-02-11 00:58, Grant Likely wrote: This patch creates of_count_phandle_with_args(), a new function for counting the number of phandle+argument tuples in a given property. This is better than the existing

Re: [PATCH] of: Create function for counting number of phandles in a property

2013-02-12 Thread Grant Likely
On Mon, 11 Feb 2013 12:26:15 +0100, Andreas Larsson andr...@gaisler.com wrote: On 2013-02-11 00:58, Grant Likely wrote: diff --git a/drivers/of/base.c b/drivers/of/base.c index 2390ddb..e1120a2 100644 --- a/drivers/of/base.c +++ b/drivers/of/base.c @@ -1025,12 +1025,13 @@

Re: [PATCH] of: Create function for counting number of phandles in a property

2013-02-11 Thread Andreas Larsson
On 2013-02-11 00:58, Grant Likely wrote: diff --git a/drivers/of/base.c b/drivers/of/base.c index 2390ddb..e1120a2 100644 --- a/drivers/of/base.c +++ b/drivers/of/base.c @@ -1025,12 +1025,13 @@ EXPORT_SYMBOL(of_parse_phandle); * To get a device_node of the `node2' node you may call this: *

Re: [PATCH] of: Create function for counting number of phandles in a property

2013-02-11 Thread Andreas Larsson
On 2013-02-11 00:58, Grant Likely wrote: diff --git a/drivers/of/base.c b/drivers/of/base.c index 2390ddb..e1120a2 100644 --- a/drivers/of/base.c +++ b/drivers/of/base.c @@ -1025,12 +1025,13 @@ EXPORT_SYMBOL(of_parse_phandle); * To get a device_node of the `node2' node you may call this: *

[PATCH] of: Create function for counting number of phandles in a property

2013-02-10 Thread Grant Likely
This patch creates of_count_phandle_with_args(), a new function for counting the number of phandle+argument tuples in a given property. This is better than the existing method of parsing each phandle individually until parsing fails which is a horribly slow way to do the count. It also converts

[PATCH] of: Create function for counting number of phandles in a property

2013-02-10 Thread Grant Likely
This patch creates of_count_phandle_with_args(), a new function for counting the number of phandle+argument tuples in a given property. This is better than the existing method of parsing each phandle individually until parsing fails which is a horribly slow way to do the count. It also converts