diff options
author | Dave C Boutcher <sleddog@us.ibm.com> | 2006-01-12 16:09:29 -0600 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2006-01-13 21:11:57 +1100 |
commit | ecaa8b0ff326920c8a89d748382e1c1d8812676c (patch) | |
tree | 49027f063fee21f6b03f4b2ccd5c0b80b0aa4440 /arch/powerpc | |
parent | 088186ded490ced80758200cf8f906ed741df306 (diff) | |
download | op-kernel-dev-ecaa8b0ff326920c8a89d748382e1c1d8812676c.zip op-kernel-dev-ecaa8b0ff326920c8a89d748382e1c1d8812676c.tar.gz |
[PATCH] powerpc: Add of_find_property function
Add an of_find_property function that returns a struct property
given a property name. Then change the get_property function to
use that routine internally.
Signed-off-by: Dave Boutcher <sleddog@us.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc')
-rw-r--r-- | arch/powerpc/kernel/prom.c | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c index 70057b6..d50c8df 100644 --- a/arch/powerpc/kernel/prom.c +++ b/arch/powerpc/kernel/prom.c @@ -1779,12 +1779,8 @@ static int __init prom_reconfig_setup(void) __initcall(prom_reconfig_setup); #endif -/* - * Find a property with a given name for a given node - * and return the value. - */ -unsigned char *get_property(struct device_node *np, const char *name, - int *lenp) +struct property *of_find_property(struct device_node *np, const char *name, + int *lenp) { struct property *pp; @@ -1797,6 +1793,17 @@ unsigned char *get_property(struct device_node *np, const char *name, } read_unlock(&devtree_lock); + return pp; +} + +/* + * Find a property with a given name for a given node + * and return the value. + */ +unsigned char *get_property(struct device_node *np, const char *name, + int *lenp) +{ + struct property *pp = of_find_property(np,name,lenp); return pp ? pp->value : NULL; } EXPORT_SYMBOL(get_property); |