diff options
author | Dong Aisheng <dong.aisheng@linaro.org> | 2012-07-11 01:16:37 -0400 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2012-07-11 01:26:51 -0400 |
commit | 475d0094293b51353e342d1198377967dbc48169 (patch) | |
tree | b10a01706dd433b93353600a00491ce62e385ec9 /include/linux/of.h | |
parent | b416c9a10baae6a177b4f9ee858b8d309542fbef (diff) |
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>
Diffstat (limited to 'include/linux/of.h')
-rw-r--r-- | include/linux/of.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/include/linux/of.h b/include/linux/of.h index 2ec1083af7ff..b27c87191df2 100644 --- a/include/linux/of.h +++ b/include/linux/of.h | |||
@@ -260,8 +260,7 @@ extern int of_machine_is_compatible(const char *compat); | |||
260 | extern int prom_add_property(struct device_node* np, struct property* prop); | 260 | extern int prom_add_property(struct device_node* np, struct property* prop); |
261 | extern int prom_remove_property(struct device_node *np, struct property *prop); | 261 | extern int prom_remove_property(struct device_node *np, struct property *prop); |
262 | extern int prom_update_property(struct device_node *np, | 262 | extern int prom_update_property(struct device_node *np, |
263 | struct property *newprop, | 263 | struct property *newprop); |
264 | struct property *oldprop); | ||
265 | 264 | ||
266 | #if defined(CONFIG_OF_DYNAMIC) | 265 | #if defined(CONFIG_OF_DYNAMIC) |
267 | /* For updating the device tree at runtime */ | 266 | /* For updating the device tree at runtime */ |