diff options
-rw-r--r-- | arch/powerpc/kernel/prom.c | 19 | ||||
-rw-r--r-- | include/asm-powerpc/prom.h | 3 |
2 files changed, 16 insertions, 6 deletions
diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c index 70057b63de21..d50c8df0183e 100644 --- a/arch/powerpc/kernel/prom.c +++ b/arch/powerpc/kernel/prom.c | |||
@@ -1779,12 +1779,8 @@ static int __init prom_reconfig_setup(void) | |||
1779 | __initcall(prom_reconfig_setup); | 1779 | __initcall(prom_reconfig_setup); |
1780 | #endif | 1780 | #endif |
1781 | 1781 | ||
1782 | /* | 1782 | struct property *of_find_property(struct device_node *np, const char *name, |
1783 | * Find a property with a given name for a given node | 1783 | int *lenp) |
1784 | * and return the value. | ||
1785 | */ | ||
1786 | unsigned char *get_property(struct device_node *np, const char *name, | ||
1787 | int *lenp) | ||
1788 | { | 1784 | { |
1789 | struct property *pp; | 1785 | struct property *pp; |
1790 | 1786 | ||
@@ -1797,6 +1793,17 @@ unsigned char *get_property(struct device_node *np, const char *name, | |||
1797 | } | 1793 | } |
1798 | read_unlock(&devtree_lock); | 1794 | read_unlock(&devtree_lock); |
1799 | 1795 | ||
1796 | return pp; | ||
1797 | } | ||
1798 | |||
1799 | /* | ||
1800 | * Find a property with a given name for a given node | ||
1801 | * and return the value. | ||
1802 | */ | ||
1803 | unsigned char *get_property(struct device_node *np, const char *name, | ||
1804 | int *lenp) | ||
1805 | { | ||
1806 | struct property *pp = of_find_property(np,name,lenp); | ||
1800 | return pp ? pp->value : NULL; | 1807 | return pp ? pp->value : NULL; |
1801 | } | 1808 | } |
1802 | EXPORT_SYMBOL(get_property); | 1809 | EXPORT_SYMBOL(get_property); |
diff --git a/include/asm-powerpc/prom.h b/include/asm-powerpc/prom.h index 25d8d5974d19..5b2bd4eefb01 100644 --- a/include/asm-powerpc/prom.h +++ b/include/asm-powerpc/prom.h | |||
@@ -136,6 +136,9 @@ extern struct device_node *of_find_all_nodes(struct device_node *prev); | |||
136 | extern struct device_node *of_get_parent(const struct device_node *node); | 136 | extern struct device_node *of_get_parent(const struct device_node *node); |
137 | extern struct device_node *of_get_next_child(const struct device_node *node, | 137 | extern struct device_node *of_get_next_child(const struct device_node *node, |
138 | struct device_node *prev); | 138 | struct device_node *prev); |
139 | extern struct property *of_find_property(struct device_node *np, | ||
140 | const char *name, | ||
141 | int *lenp); | ||
139 | extern struct device_node *of_node_get(struct device_node *node); | 142 | extern struct device_node *of_node_get(struct device_node *node); |
140 | extern void of_node_put(struct device_node *node); | 143 | extern void of_node_put(struct device_node *node); |
141 | 144 | ||