mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Marc Kleine-Budde <mkl@pengutronix.de>
To: barebox@lists.infradead.org
Subject: [PATCH 04/16] of: make first argument of several of_property_*_string functions const
Date: Sat, 28 Feb 2015 22:40:09 +0100	[thread overview]
Message-ID: <1425159621-22805-5-git-send-email-mkl@pengutronix.de> (raw)
In-Reply-To: <1425159621-22805-1-git-send-email-mkl@pengutronix.de>

Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
---
 drivers/of/base.c |  8 ++++----
 include/of.h      | 16 ++++++++--------
 2 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/drivers/of/base.c b/drivers/of/base.c
index af10fd1da32c..4b5d4d75f19c 100644
--- a/drivers/of/base.c
+++ b/drivers/of/base.c
@@ -799,7 +799,7 @@ EXPORT_SYMBOL_GPL(of_property_read_u64);
  *
  * The out_string pointer is modified only if a valid string can be decoded.
  */
-int of_property_read_string(struct device_node *np, const char *propname,
+int of_property_read_string(const struct device_node *np, const char *propname,
 				const char **out_string)
 {
 	struct property *prop = of_find_property(np, propname, NULL);
@@ -832,7 +832,7 @@ EXPORT_SYMBOL_GPL(of_property_read_string);
  *
  * The out_string pointer is modified only if a valid string can be decoded.
  */
-int of_property_read_string_index(struct device_node *np, const char *propname,
+int of_property_read_string_index(const struct device_node *np, const char *propname,
 				  int index, const char **output)
 {
 	struct property *prop = of_find_property(np, propname, NULL);
@@ -869,7 +869,7 @@ EXPORT_SYMBOL_GPL(of_property_read_string_index);
  * This function searches a string list property and returns the index
  * of a specific string value.
  */
-int of_property_match_string(struct device_node *np, const char *propname,
+int of_property_match_string(const struct device_node *np, const char *propname,
 			     const char *string)
 {
 	struct property *prop = of_find_property(np, propname, NULL);
@@ -909,7 +909,7 @@ EXPORT_SYMBOL_GPL(of_property_match_string);
  * does not have a value, and -EILSEQ if the string is not null-terminated
  * within the length of the property data.
  */
-int of_property_count_strings(struct device_node *np, const char *propname)
+int of_property_count_strings(const struct device_node *np, const char *propname)
 {
 	struct property *prop = of_find_property(np, propname, NULL);
 	int i = 0;
diff --git a/include/of.h b/include/of.h
index 2ad941864f5d..4019b927aa98 100644
--- a/include/of.h
+++ b/include/of.h
@@ -171,16 +171,16 @@ extern int of_property_read_u32_array(const struct device_node *np,
 extern int of_property_read_u64(const struct device_node *np,
 				const char *propname, u64 *out_value);
 
-extern int of_property_read_string(struct device_node *np,
+extern int of_property_read_string(const struct device_node *np,
 				   const char *propname,
 				   const char **out_string);
-extern int of_property_read_string_index(struct device_node *np,
+extern int of_property_read_string_index(const struct device_node *np,
 					 const char *propname,
 					 int index, const char **output);
-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_count_strings(struct device_node *np,
+extern int of_property_count_strings(const struct device_node *np,
 				     const char *propname);
 
 extern const __be32 *of_prop_next_u32(struct property *prop,
@@ -373,25 +373,25 @@ static inline int of_property_read_u64(const struct device_node *np,
 	return -ENOSYS;
 }
 
-static inline int of_property_read_string(struct device_node *np,
+static inline int of_property_read_string(const struct device_node *np,
 				const char *propname, const char **out_string)
 {
 	return -ENOSYS;
 }
 
-static inline int of_property_read_string_index(struct device_node *np,
+static inline int of_property_read_string_index(const struct device_node *np,
 			 const char *propname, int index, const char **output)
 {
 	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;
 }
 
-static inline int of_property_count_strings(struct device_node *np,
+static inline int of_property_count_strings(const struct device_node *np,
 					const char *propname)
 {
 	return -ENOSYS;
-- 
2.1.4


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  parent reply	other threads:[~2015-02-28 21:40 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-28 21:40 general cleanups and sandbox OF integration Marc Kleine-Budde
2015-02-28 21:40 ` [PATCH 01/16] drivers: remove unused function dev_protect() Marc Kleine-Budde
2015-02-28 21:40 ` [PATCH 02/16] fs: make "offset" parameter of erase() and protect() 64 bit safe Marc Kleine-Budde
2015-02-28 21:40 ` [PATCH 03/16] of_path: of_find_path(): remove unused variable len Marc Kleine-Budde
2015-02-28 21:40 ` Marc Kleine-Budde [this message]
2015-03-01  7:27   ` [PATCH 04/16] of: make first argument of several of_property_*_string functions const Sascha Hauer
2015-03-01 10:47     ` Marc Kleine-Budde
2015-02-28 21:40 ` [PATCH 05/16] of/base: fix sparse warning, don't use interger 0 as NULL pointer Marc Kleine-Budde
2015-02-28 21:40 ` [PATCH 06/16] sandbox: fix indention in help text Marc Kleine-Budde
2015-02-28 21:40 ` [PATCH 07/16] sandbox: add support to pass dtb to barebox Marc Kleine-Budde
2015-03-01  7:33   ` Sascha Hauer
2015-03-01 10:46     ` Marc Kleine-Budde
2015-02-28 21:40 ` [PATCH 08/16] sandbox: hostfile: clarify variable names Marc Kleine-Budde
2015-02-28 21:40 ` [PATCH 09/16] sandbox: hostfile: probe(): add missing pointer from cdev.dev to dev Marc Kleine-Budde
2015-02-28 21:40 ` [PATCH 10/16] sandbox: hostfile: remove struct hf_platform_data from hf_priv Marc Kleine-Budde
2015-02-28 21:40 ` [PATCH 11/16] sandbox: hostfile: move fd from platform data to priv Marc Kleine-Budde
2015-02-28 21:40 ` [PATCH 12/16] sandbox: hostfile: probe driver earlier Marc Kleine-Budde
2015-02-28 21:40 ` [PATCH 13/16] sandbox: hostfile: use the memory resource to determine the size not the platform_data Marc Kleine-Budde
2015-02-28 21:40 ` [PATCH 14/16] sandbox: hostfile: add support for OF Marc Kleine-Budde
2015-02-28 21:40 ` [PATCH 15/16] sandbox: add sample dts Marc Kleine-Budde
2015-02-28 21:40 ` [PATCH 16/16] sandbox: activate OF support in defconfig Marc Kleine-Budde

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1425159621-22805-5-git-send-email-mkl@pengutronix.de \
    --to=mkl@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox