mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
[PATCH] powerpc: Add/remove/update properties in /proc/device-tree
Add support to the proc_device_tree file for removing and updating properties. Remove just removes the proc file, update changes the data pointer within the proc file. The remainder of the device-tree changes occur elsewhere. Signed-off-by: Dave Boutcher <[email protected]> Signed-off-by: Paul Mackerras <[email protected]>
This commit is contained in:
parent
43ccf20221
commit
898b5395e9
2 changed files with 29 additions and 0 deletions
|
|
@ -81,6 +81,30 @@ void proc_device_tree_add_prop(struct proc_dir_entry *pde, struct property *prop
|
|||
__proc_device_tree_add_prop(pde, prop);
|
||||
}
|
||||
|
||||
void proc_device_tree_remove_prop(struct proc_dir_entry *pde,
|
||||
struct property *prop)
|
||||
{
|
||||
remove_proc_entry(prop->name, pde);
|
||||
}
|
||||
|
||||
void proc_device_tree_update_prop(struct proc_dir_entry *pde,
|
||||
struct property *newprop,
|
||||
struct property *oldprop)
|
||||
{
|
||||
struct proc_dir_entry *ent;
|
||||
|
||||
for (ent = pde->subdir; ent != NULL; ent = ent->next)
|
||||
if (ent->data == oldprop)
|
||||
break;
|
||||
if (ent == NULL) {
|
||||
printk(KERN_WARNING "device-tree: property \"%s\" "
|
||||
" does not exist\n", oldprop->name);
|
||||
} else {
|
||||
ent->data = newprop;
|
||||
ent->size = newprop->length;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Process a node, adding entries for its children and its properties.
|
||||
*/
|
||||
|
|
|
|||
Loading…
Reference in a new issue