/* Returns a node pointer with refcount incremented, use of_node_put() on it when done.  */
struct device_node* of_find_node_by_path(const char *path)
/* Returns a node pointer with refcount incremented, use of_node_put() on it when done.  */
struct device_node* of_find_node_by_path(const char *path)
{
	struct device_node *np = allnodes;
	read_lock(&devtree_lock);
	for (; np; np = np->allnext) {
		if (np->full_name && (of_node_cmp(np->full_name, path) == 0)
		    && of_node_get(np))
			break;
	}
	read_unlock(&devtree_lock);
	return np;
}