]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
of: add 'const' to of_node_full_name parameter
authorSteffen Trumtrar <s.trumtrar@pengutronix.de>
Tue, 18 Dec 2012 10:32:03 +0000 (11:32 +0100)
committerGrant Likely <grant.likely@secretlab.ca>
Wed, 6 Feb 2013 11:06:36 +0000 (11:06 +0000)
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>
include/linux/of.h

index 5ebcc5c8e42399f07ef6d46b308835b05a0ae6ad..1e0d0c1bfb5e68085ab8388d025eff46aec54c61 100644 (file)
@@ -160,7 +160,7 @@ static inline unsigned long of_read_ulong(const __be32 *cell, int size)
 
 #define OF_BAD_ADDR    ((u64)-1)
 
-static inline const char* of_node_full_name(struct device_node *np)
+static inline const char *of_node_full_name(const struct device_node *np)
 {
        return np ? np->full_name : "<no-node>";
 }