[PATCH] OF: base: initalize from node in of_find_node_with_property
Sascha Hauer
s.hauer at pengutronix.de
Tue Jul 9 02:55:14 EDT 2013
On Fri, Jul 05, 2013 at 11:19:43PM +0200, Sebastian Hesselbarth wrote:
> This adds initialization of from device node with root_node if NULL
> is passed. This corresponds to the behavior of all other node iterators.
>
> Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth at gmail.com>
> ---
> @Sascha: this is the last remaining iterator fix we talked about.
Applied, thanks
Sascha
>
> Cc: Sascha Hauer <s.hauer at pengutronix.de>
> Cc: barebox at lists.infradead.org
> ---
> drivers/of/base.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/drivers/of/base.c b/drivers/of/base.c
> index 5440f40..7bee912 100644
> --- a/drivers/of/base.c
> +++ b/drivers/of/base.c
> @@ -364,6 +364,9 @@ struct device_node *of_find_node_with_property(struct device_node *from,
> {
> struct device_node *np;
>
> + if (!from)
> + from = root_node;
> +
> of_tree_for_each_node_from(np, from) {
> struct property *pp = of_find_property(np, prop_name, NULL);
> if (pp)
> --
> 1.7.10.4
>
>
--
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