From: Michael Ellerman Date: Tue, 19 Jun 2007 06:08:00 +0000 (+1000) Subject: [POWERPC] Add a warning to help trackdown device_node refcounting bugs X-Git-Tag: v2.6.23-rc1~767^2^2~25 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6a281856c02d2291df2f7d9df5bfdee2e7bdd747;p=pandora-kernel.git [POWERPC] Add a warning to help trackdown device_node refcounting bugs When the refcount for a device node goes to 0, we call the destructor - of_node_release(). This should only happen if we've already detached the node from the device tree. So add a flag OF_DETACHED which tracks detached-ness, and if we find ourselves in of_node_release() without it set, issue a warning and don't free the device_node. To avoid warning continuously reinitialise the kref to a sane value. Signed-off-by: Michael Ellerman Signed-off-by: Paul Mackerras --- Reading git-diff-tree failed