diff options
author | Jeremy Kerr <jeremy.kerr@canonical.com> | 2010-02-01 21:34:11 -0700 |
---|---|---|
committer | Grant Likely <grant.likely@secretlab.ca> | 2010-02-09 08:32:48 -0700 |
commit | 89751a7cb70a20f0d604dd7c4be29dd7b0011718 (patch) | |
tree | 17abed1974c3c79c978b20bd396078df80f19f40 /arch/microblaze | |
parent | fcdeb7fedf89f4bbc2e11959794968080cd8426e (diff) | |
download | linux-89751a7cb70a20f0d604dd7c4be29dd7b0011718.tar.gz linux-89751a7cb70a20f0d604dd7c4be29dd7b0011718.tar.bz2 linux-89751a7cb70a20f0d604dd7c4be29dd7b0011718.zip |
of: merge of_find_node_by_phandle
Merge common function between powerpc, sparc and microblaze. Code is
identical for powerpc and microblaze, but adds a lock (and release) of
the devtree_lock on sparc.
Signed-off-by: Jeremy Kerr <jeremy.kerr@canonical.com>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Diffstat (limited to 'arch/microblaze')
-rw-r--r-- | arch/microblaze/kernel/prom.c | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/arch/microblaze/kernel/prom.c b/arch/microblaze/kernel/prom.c index 8171282a0b0d..f7bd0ee8d481 100644 --- a/arch/microblaze/kernel/prom.c +++ b/arch/microblaze/kernel/prom.c @@ -176,27 +176,6 @@ void __init early_init_devtree(void *params) * *******/ -/** - * of_find_node_by_phandle - Find a node given a phandle - * @handle: phandle of the node to find - * - * Returns a node pointer with refcount incremented, use - * of_node_put() on it when done. - */ -struct device_node *of_find_node_by_phandle(phandle handle) -{ - struct device_node *np; - - read_lock(&devtree_lock); - for (np = allnodes; np != NULL; np = np->allnext) - if (np->phandle == handle) - break; - of_node_get(np); - read_unlock(&devtree_lock); - return np; -} -EXPORT_SYMBOL(of_find_node_by_phandle); - #if defined(CONFIG_DEBUG_FS) && defined(DEBUG) static struct debugfs_blob_wrapper flat_dt_blob; |