• Paul Mackerras's avatar
    [PATCH] ppc64: use kref for device_node refcounting · 5c8bfbc4
    Paul Mackerras authored
    This patch is from Nathan Lynch <nathanl@austin.ibm.com>.
    
    This changes struct device_node and associated code to use the kref api for
    object refcounting and freeing.  I've given it some testing on pSeries with
    cpu add/remove and verified that the release function works.  The change is
    somewhat cosmetic but it does make the code easier to understand...  at least
    I think so =)
    
    The only real change is that the refcount on all device_nodes is initialized
    at 1, and the device node is freed when the refcount reaches 0 (of_remove_node
    has the extra "put" to ensure that this happens).  This lets us get rid of the
    OF_STALE flag and macros in prom.h.
    Signed-off-by: default avatarNathan Lynch <nathanl@austin.ibm.com>
    Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
    Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
    5c8bfbc4
prom.h 7.09 KB