diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2017-03-30 10:36:58 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2017-03-30 23:37:20 +0200 |
commit | 2d36433aa8f360b3c9fce3f4efc0a34c69444694 (patch) | |
tree | 76de4105445cf4720af34a236104ebd003184d57 /include | |
parent | 441e9f5a72b245b671118f3e771eb129834a7a34 (diff) | |
download | barebox-2d36433aa8f360b3c9fce3f4efc0a34c69444694.tar.gz barebox-2d36433aa8f360b3c9fce3f4efc0a34c69444694.tar.xz |
of: Add of_property_write_string()
Setting a property to a string is used many times. Create a convenience
function for it.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include')
-rw-r--r-- | include/of.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/of.h b/include/of.h index e3bb452b86..6bff13388d 100644 --- a/include/of.h +++ b/include/of.h @@ -205,6 +205,8 @@ extern int of_property_write_u32_array(struct device_node *np, extern int of_property_write_u64_array(struct device_node *np, const char *propname, const u64 *values, size_t sz); +extern int of_property_write_string(struct device_node *np, const char *propname, + const char *value); extern struct device_node *of_parse_phandle(const struct device_node *np, const char *phandle_name, @@ -466,6 +468,12 @@ static inline int of_property_write_u64_array(struct device_node *np, return -ENOSYS; } +static inline int of_property_write_string(struct device_node *np, const char *propname, + const char *value) +{ + return -ENOSYS; +} + static inline struct device_node *of_parse_phandle(const struct device_node *np, const char *phandle_name, int index) { |