Subject: Re: [PATCH] powerpc: add of_find_next_property and of_get_aliased_index

From: Benjamin Herrenschmidt <[email-masked]>
Date: Thu, 26 Jun 2008 20:57:44 +1000

> +struct property *of_find_next_property(const struct device_node *np,
> +	struct property *prev)
> +{
> +	struct property *next;
> +
> +	if (!np)
> +		return NULL;
> +
> +	read_lock(&devtree_lock);
> +	next = prev ? prev->next : np->properties;
> +	read_unlock(&devtree_lock);
> +
> +	return next;
> +}

Unfortunately, this isn't race free vs. removal or addition of
properties. This is fine with the intended usage (ie. retreiving
aliases) but at least that should be explained in a comment.

Cheers,
Ben.