On 10/28/2015 07:20 AM, Sascha Hauer wrote: > On Sun, Oct 25, 2015 at 10:03:29PM +0100, Marc Kleine-Budde wrote: >> This patch adds the function of_find_path_by_node(), which is similar to >> of_find_path(), but it translates a device tree node into a barebox device >> path >> directly. >> >> Signed-off-by: Marc Kleine-Budde <m...@pengutronix.de> >> --- >> drivers/of/of_path.c | 17 ++++++++++++++++- >> include/of.h | 1 + >> 2 files changed, 17 insertions(+), 1 deletion(-) >> >> diff --git a/drivers/of/of_path.c b/drivers/of/of_path.c >> index ad64bee08af9..690390525919 100644 >> --- a/drivers/of/of_path.c >> +++ b/drivers/of/of_path.c >> @@ -126,7 +126,7 @@ static int __of_find_path(struct device_node *node, >> const char *propname, char * >> >> i = 1; >> >> - while (1) { >> + while (propname) { >> ret = of_property_read_string_index(node, propname, i++, &str); >> if (ret) >> break; > > Is this hunk intentional? Is this a fix for something?
Yes, it's called with propname == NULL by int of_find_path_by_node(): > +int of_find_path_by_node(struct device_node *node, char **outpath, unsigned > flags) > +{ > + return __of_find_path(node, NULL, outpath, flags); ^^^^ > +} > + Marc -- Pengutronix e.K. | Marc Kleine-Budde | Industrial Linux Solutions | Phone: +49-231-2826-924 | Vertretung West/Dortmund | Fax: +49-5121-206917-5555 | Amtsgericht Hildesheim, HRA 2686 | http://www.pengutronix.de |
signature.asc
Description: OpenPGP digital signature
_______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox