diff options
-rw-r--r-- | arch/microblaze/kernel/prom.c | 21 | ||||
-rw-r--r-- | arch/powerpc/kernel/prom.c | 21 | ||||
-rw-r--r-- | arch/sparc/kernel/prom_common.c | 12 | ||||
-rw-r--r-- | drivers/of/base.c | 21 |
4 files changed, 21 insertions, 54 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) | |||
176 | * | 176 | * |
177 | *******/ | 177 | *******/ |
178 | 178 | ||
179 | /** | ||
180 | * of_find_node_by_phandle - Find a node given a phandle | ||
181 | * @handle: phandle of the node to find | ||
182 | * | ||
183 | * Returns a node pointer with refcount incremented, use | ||
184 | * of_node_put() on it when done. | ||
185 | */ | ||
186 | struct device_node *of_find_node_by_phandle(phandle handle) | ||
187 | { | ||
188 | struct device_node *np; | ||
189 | |||
190 | read_lock(&devtree_lock); | ||
191 | for (np = allnodes; np != NULL; np = np->allnext) | ||
192 | if (np->phandle == handle) | ||
193 | break; | ||
194 | of_node_get(np); | ||
195 | read_unlock(&devtree_lock); | ||
196 | return np; | ||
197 | } | ||
198 | EXPORT_SYMBOL(of_find_node_by_phandle); | ||
199 | |||
200 | #if defined(CONFIG_DEBUG_FS) && defined(DEBUG) | 179 | #if defined(CONFIG_DEBUG_FS) && defined(DEBUG) |
201 | static struct debugfs_blob_wrapper flat_dt_blob; | 180 | static struct debugfs_blob_wrapper flat_dt_blob; |
202 | 181 | ||
diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c index f954c718d7eb..28be19ab0f18 100644 --- a/arch/powerpc/kernel/prom.c +++ b/arch/powerpc/kernel/prom.c | |||
@@ -766,27 +766,6 @@ void __init early_init_devtree(void *params) | |||
766 | *******/ | 766 | *******/ |
767 | 767 | ||
768 | /** | 768 | /** |
769 | * of_find_node_by_phandle - Find a node given a phandle | ||
770 | * @handle: phandle of the node to find | ||
771 | * | ||
772 | * Returns a node pointer with refcount incremented, use | ||
773 | * of_node_put() on it when done. | ||
774 | */ | ||
775 | struct device_node *of_find_node_by_phandle(phandle handle) | ||
776 | { | ||
777 | struct device_node *np; | ||
778 | |||
779 | read_lock(&devtree_lock); | ||
780 | for (np = allnodes; np != 0; np = np->allnext) | ||
781 | if (np->phandle == handle) | ||
782 | break; | ||
783 | of_node_get(np); | ||
784 | read_unlock(&devtree_lock); | ||
785 | return np; | ||
786 | } | ||
787 | EXPORT_SYMBOL(of_find_node_by_phandle); | ||
788 | |||
789 | /** | ||
790 | * of_find_next_cache_node - Find a node's subsidiary cache | 769 | * of_find_next_cache_node - Find a node's subsidiary cache |
791 | * @np: node of type "cpu" or "cache" | 770 | * @np: node of type "cpu" or "cache" |
792 | * | 771 | * |
diff --git a/arch/sparc/kernel/prom_common.c b/arch/sparc/kernel/prom_common.c index 5832e13dfeeb..57ac9e28be0c 100644 --- a/arch/sparc/kernel/prom_common.c +++ b/arch/sparc/kernel/prom_common.c | |||
@@ -37,18 +37,6 @@ EXPORT_SYMBOL(of_console_path); | |||
37 | char *of_console_options; | 37 | char *of_console_options; |
38 | EXPORT_SYMBOL(of_console_options); | 38 | EXPORT_SYMBOL(of_console_options); |
39 | 39 | ||
40 | struct device_node *of_find_node_by_phandle(phandle handle) | ||
41 | { | ||
42 | struct device_node *np; | ||
43 | |||
44 | for (np = allnodes; np; np = np->allnext) | ||
45 | if (np->phandle == handle) | ||
46 | break; | ||
47 | |||
48 | return np; | ||
49 | } | ||
50 | EXPORT_SYMBOL(of_find_node_by_phandle); | ||
51 | |||
52 | int of_getintprop_default(struct device_node *np, const char *name, int def) | 40 | int of_getintprop_default(struct device_node *np, const char *name, int def) |
53 | { | 41 | { |
54 | struct property *prop; | 42 | struct property *prop; |
diff --git a/drivers/of/base.c b/drivers/of/base.c index 2ce58be314af..785e9cc1b207 100644 --- a/drivers/of/base.c +++ b/drivers/of/base.c | |||
@@ -615,6 +615,27 @@ int of_modalias_node(struct device_node *node, char *modalias, int len) | |||
615 | EXPORT_SYMBOL_GPL(of_modalias_node); | 615 | EXPORT_SYMBOL_GPL(of_modalias_node); |
616 | 616 | ||
617 | /** | 617 | /** |
618 | * of_find_node_by_phandle - Find a node given a phandle | ||
619 | * @handle: phandle of the node to find | ||
620 | * | ||
621 | * Returns a node pointer with refcount incremented, use | ||
622 | * of_node_put() on it when done. | ||
623 | */ | ||
624 | struct device_node *of_find_node_by_phandle(phandle handle) | ||
625 | { | ||
626 | struct device_node *np; | ||
627 | |||
628 | read_lock(&devtree_lock); | ||
629 | for (np = allnodes; np; np = np->allnext) | ||
630 | if (np->phandle == handle) | ||
631 | break; | ||
632 | of_node_get(np); | ||
633 | read_unlock(&devtree_lock); | ||
634 | return np; | ||
635 | } | ||
636 | EXPORT_SYMBOL(of_find_node_by_phandle); | ||
637 | |||
638 | /** | ||
618 | * of_parse_phandle - Resolve a phandle property to a device_node pointer | 639 | * of_parse_phandle - Resolve a phandle property to a device_node pointer |
619 | * @np: Pointer to device node holding phandle property | 640 | * @np: Pointer to device node holding phandle property |
620 | * @phandle_name: Name of property holding a phandle value | 641 | * @phandle_name: Name of property holding a phandle value |