[PATCHv3 1/5] of: base: Add for_each_node_by_name_from
Sascha Hauer
s.hauer at pengutronix.de
Tue Sep 30 23:13:15 PDT 2014
On Tue, Sep 30, 2014 at 01:15:26PM +0200, Teresa Gámez wrote:
> Added for_each_node_by_name_from() to be able to
> pass external root node.
>
> Signed-off-by: Teresa Gámez <t.gamez at phytec.de>
Applied all, thanks
Sascha
> ---
> include/of.h | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/include/of.h b/include/of.h
> index e6993fd..cd2bfe0 100644
> --- a/include/of.h
> +++ b/include/of.h
> @@ -568,6 +568,9 @@ static inline struct device_d *of_find_device_by_node(struct device_node *np)
> #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_name_from(dn, root, name) \
> + for (dn = of_find_node_by_name(root, name); dn; \
> + dn = of_find_node_by_name(dn, name))
> #define for_each_compatible_node(dn, type, compatible) \
> for (dn = of_find_compatible_node(NULL, type, compatible); dn; \
> dn = of_find_compatible_node(dn, type, compatible))
> --
> 1.9.1
>
>
> _______________________________________________
> barebox mailing list
> barebox at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/barebox
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
More information about the barebox
mailing list