[PATCH 2/3] of: Introduce safe accessors for node->data

Grant Likely grant.likely at secretlab.ca
Wed Feb 10 04:25:22 EST 2010


On Fri, Feb 5, 2010 at 1:50 PM, Anton Vorontsov
<avorontsov at ru.mvista.com> wrote:
> Platform code use node->data to store some private information
> associated with a node.
>
> Previously there was no need for any locks and accessors since we were
> initializing the data mostly at boot time and never modified it later.
>
> Though, nowadays OF GPIO infrastructure supports GPIO chips detaching,
> so to handle this correctly we have to introduce locking for the
> node->data field.

I'm not convinced this is needed.  What's wrong with using the
whole-tree devtree_lock?

g.


More information about the devicetree-discuss mailing list