diff options
author | Dave C Boutcher <sleddog@us.ibm.com> | 2006-01-12 16:08:27 -0600 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2006-01-13 21:02:50 +1100 |
commit | 088186ded490ced80758200cf8f906ed741df306 (patch) | |
tree | 0afbaac2b9843937c63da79dfbd91a60f606c00f /include | |
parent | 898b5395e915210f41223caa30312994d64cba1d (diff) | |
download | kernel-crypto-088186ded490ced80758200cf8f906ed741df306.tar.gz kernel-crypto-088186ded490ced80758200cf8f906ed741df306.tar.xz kernel-crypto-088186ded490ced80758200cf8f906ed741df306.zip |
[PATCH] powerpc: Add/remove/update properties in firmware device tree
Add support for updating and removing device tree
properties. Since we hand out pointers to properties with gay
abandon, we can't just free the property storage. Instead we
move deleted, or the old copy of an updated property, to a
"dead properties" list.
Also note, its not feasable to kref device tree properties.
we call get_property() all over the kernel in a wild variety
of contexts.
One consequence of this change is that we now take a
read_lock(&devtree_lock) when doing get_property().
Signed-off-by: Dave Boutcher <sleddog@us.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/asm-powerpc/prom.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/asm-powerpc/prom.h b/include/asm-powerpc/prom.h index 329e9bf6226..25d8d5974d1 100644 --- a/include/asm-powerpc/prom.h +++ b/include/asm-powerpc/prom.h @@ -87,6 +87,7 @@ struct device_node { char *full_name; struct property *properties; + struct property *deadprops; /* removed properties */ struct device_node *parent; struct device_node *child; struct device_node *sibling; @@ -164,6 +165,10 @@ extern int prom_n_size_cells(struct device_node* np); extern int prom_n_intr_cells(struct device_node* np); extern void prom_get_irq_senses(unsigned char *senses, int off, int max); extern int prom_add_property(struct device_node* np, struct property* prop); +extern int prom_remove_property(struct device_node *np, struct property *prop); +extern int prom_update_property(struct device_node *np, + struct property *newprop, + struct property *oldprop); #ifdef CONFIG_PPC32 /* |