diff options
author | Ahmad Fatoum <a.fatoum@pengutronix.de> | 2022-12-05 14:32:26 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2022-12-07 07:57:58 +0100 |
commit | 95b7e3db08a25e12b55624b81cb27ee1a507bdba (patch) | |
tree | 78e16227fa1dc74bbd2b3d9eae99b7f4f6d996f4 /include/of.h | |
parent | d3b8a88d34cc608084e31715ca2cab54c65cb39a (diff) | |
download | barebox-95b7e3db08a25e12b55624b81cb27ee1a507bdba.tar.gz barebox-95b7e3db08a25e12b55624b81cb27ee1a507bdba.tar.xz |
of: have of_property_match_string accept pointer to const device_node
This function need not have mutable access to the device node, so make
the parameter const to allow calling it from more places without
sacrificing cost safety.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.barebox.org/20221205133227.3010785-1-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include/of.h')
-rw-r--r-- | include/of.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/of.h b/include/of.h index 052d5fcad8..c19a17584e 100644 --- a/include/of.h +++ b/include/of.h @@ -229,7 +229,7 @@ extern int of_property_read_variable_u64_array(const struct device_node *np, extern int of_property_read_string(struct device_node *np, const char *propname, const char **out_string); -extern int of_property_match_string(struct device_node *np, +extern int of_property_match_string(const struct device_node *np, const char *propname, const char *string); extern int of_property_read_string_helper(const struct device_node *np, @@ -616,7 +616,7 @@ static inline int of_property_read_string(struct device_node *np, return -ENOSYS; } -static inline int of_property_match_string(struct device_node *np, +static inline int of_property_match_string(const struct device_node *np, const char *propname, const char *string) { return -ENOSYS; |