mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00: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 <grant.likely@secretlab.ca> Signed-off-by: Dong Aisheng <dong.aisheng@linaro.org> Acked-by: Rob Herring <rob.herring@calxeda.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
This commit is contained in:
parent
b416c9a10b
commit
475d009429
6 changed files with 25 additions and 30 deletions
|
@ -260,8 +260,7 @@ extern int of_machine_is_compatible(const char *compat);
|
|||
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);
|
||||
struct property *newprop);
|
||||
|
||||
#if defined(CONFIG_OF_DYNAMIC)
|
||||
/* For updating the device tree at runtime */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue