Skip to content

Commit

Permalink
of: add 'const' to of_node_full_name parameter
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Grant Likely <[email protected]>
  • Loading branch information
strumtrar authored and glikely committed Feb 6, 2013
1 parent ced4eec commit c0a05bf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/linux/of.h
Original file line number Diff line number Diff line change
Expand Up @@ -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>";
}
Expand Down

0 comments on commit c0a05bf

Please sign in to comment.