Re: [PATCH 1/3] of: Add of_match_machine helper

2014-08-18 Thread Tuomas Tynkkynen
On 17/08/14 18:28, Grant Likely wrote: > On Fri, 8 Aug 2014 02:01:53 +0300, Tuomas Tynkkynen > wrote: [...] >> +EXPORT_SYMBOL(of_match_machine); > > Too wordy... > > return of_match_node(matches, of_allnodes); > > :-) > > It could be a static inline, but I don't think it's even worth ha

Re: [PATCH 1/3] of: Add of_match_machine helper

2014-08-17 Thread Grant Likely
On Fri, 8 Aug 2014 02:01:53 +0300, Tuomas Tynkkynen wrote: > Add of_match_machine function to test the device tree root for an > of_match array. This can be useful when testing SoC versions at runtime, > for example. > > Signed-off-by: Tuomas Tynkkynen > --- > drivers/of/base.c | 21 +

Re: [PATCH 1/3] of: Add of_match_machine helper

2014-08-17 Thread Grant Likely
On Fri, 8 Aug 2014 14:01:57 -0500, Rob Herring wrote: > On Fri, Aug 8, 2014 at 8:23 AM, Tuomas Tynkkynen > wrote: > > > > > > On 08/08/14 12:41, Thierry Reding wrote: > >> > >>> +const struct of_device_id *of_match_machine(const struct of_device_id > >>> *matches) > >>> +{ > >>> +const stru

Re: [PATCH 1/3] of: Add of_match_machine helper

2014-08-08 Thread Rob Herring
On Fri, Aug 8, 2014 at 8:23 AM, Tuomas Tynkkynen wrote: > > > On 08/08/14 12:41, Thierry Reding wrote: >> >>> +const struct of_device_id *of_match_machine(const struct of_device_id >>> *matches) >>> +{ >>> +const struct of_device_id *match; >>> +struct device_node *root; >>> + >>> +ro

Re: [PATCH 1/3] of: Add of_match_machine helper

2014-08-08 Thread Tuomas Tynkkynen
On 08/08/14 12:41, Thierry Reding wrote: > >> +const struct of_device_id *of_match_machine(const struct of_device_id >> *matches) >> +{ >> +const struct of_device_id *match; >> +struct device_node *root; >> + >> +root = of_find_node_by_path("/"); >> +if (!root) >> +r

Re: [PATCH 1/3] of: Add of_match_machine helper

2014-08-08 Thread Thierry Reding
On Fri, Aug 08, 2014 at 02:01:53AM +0300, Tuomas Tynkkynen wrote: > Add of_match_machine function to test the device tree root for an > of_match array. This can be useful when testing SoC versions at runtime, > for example. > > Signed-off-by: Tuomas Tynkkynen > --- > drivers/of/base.c | 21

[PATCH 1/3] of: Add of_match_machine helper

2014-08-07 Thread Tuomas Tynkkynen
Add of_match_machine function to test the device tree root for an of_match array. This can be useful when testing SoC versions at runtime, for example. Signed-off-by: Tuomas Tynkkynen --- drivers/of/base.c | 21 + include/linux/of.h | 3 +++ 2 files changed, 24 insertions(+