Re: [PATCH v3 2/9] of_path: add of_find_path_by_node()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <mkl@xxxxxxxxxxxxxx>
> ---
>  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?

Sascha

-- 
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 |

_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux