mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
of: Improve prom_update_property() function
prom_update_property() currently fails if the property doesn't actually exist yet which isn't what we want. Change to add-or-update instead of update-only, then we can remove a lot duplicated lines. Suggested-by: Grant Likely <[email protected]> Signed-off-by: Dong Aisheng <[email protected]> Acked-by: Rob Herring <[email protected]> Signed-off-by: Benjamin Herrenschmidt <[email protected]>
This commit is contained in:
parent
b416c9a10b
commit
475d009429
6 changed files with 25 additions and 30 deletions
|
|
@ -101,6 +101,11 @@ void proc_device_tree_update_prop(struct proc_dir_entry *pde,
|
|||
{
|
||||
struct proc_dir_entry *ent;
|
||||
|
||||
if (!oldprop) {
|
||||
proc_device_tree_add_prop(pde, newprop);
|
||||
return;
|
||||
}
|
||||
|
||||
for (ent = pde->subdir; ent != NULL; ent = ent->next)
|
||||
if (ent->data == oldprop)
|
||||
break;
|
||||
|
|
|
|||
Loading…
Reference in a new issue