diff options
author | Steffen Trumtrar <s.trumtrar@pengutronix.de> | 2012-12-18 05:32:03 -0500 |
---|---|---|
committer | Grant Likely <grant.likely@secretlab.ca> | 2013-02-06 06:06:36 -0500 |
commit | c0a05bf0182efdf7cd1fd8aa327e7a602360b67e (patch) | |
tree | 09776279dbef4d91b333e0a65542ae791f66da54 /include | |
parent | ced4eec900850627409d7ff566b009471162b56b (diff) |
of: add 'const' to of_node_full_name parameter
As the function just returns the np->full_name or the string "<no-node>", the
passed device_node pointer is not changed in any way.
The passed parameter can therefore be a const pointer.
Also, fix the following error from checkpatch.pl:
ERROR: "foo* bar" should be "foo *bar"
+static inline const char* of_node_full_name(const struct device_node *np)
Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/of.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/of.h b/include/linux/of.h index 5ebcc5c8e423..1e0d0c1bfb5e 100644 --- a/include/linux/of.h +++ b/include/linux/of.h | |||
@@ -160,7 +160,7 @@ static inline unsigned long of_read_ulong(const __be32 *cell, int size) | |||
160 | 160 | ||
161 | #define OF_BAD_ADDR ((u64)-1) | 161 | #define OF_BAD_ADDR ((u64)-1) |
162 | 162 | ||
163 | static inline const char* of_node_full_name(struct device_node *np) | 163 | static inline const char *of_node_full_name(const struct device_node *np) |
164 | { | 164 | { |
165 | return np ? np->full_name : "<no-node>"; | 165 | return np ? np->full_name : "<no-node>"; |
166 | } | 166 | } |