Skip to content

Commit

Permalink
of: *node argument to of_parse_phandle_with_args should be const
Browse files Browse the repository at this point in the history
The "struct device_node *" argument of of_parse_phandle_with_args() can
be const. Making this change makes it explicit that the function will
not modify a node.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
[grant.likely: Resolved conflict with previous patch modifying of_parse_phandle()]
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
  • Loading branch information
Guennadi Liakhovetski authored and Grant Likely committed Dec 11, 2012
1 parent 1daa8a0 commit 93c667c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion drivers/of/base.c
Original file line number Diff line number Diff line change
Expand Up @@ -1025,7 +1025,7 @@ EXPORT_SYMBOL(of_parse_phandle);
* To get a device_node of the `node2' node you may call this:
* of_parse_phandle_with_args(node3, "list", "#list-cells", 1, &args);
*/
int of_parse_phandle_with_args(struct device_node *np, const char *list_name,
int of_parse_phandle_with_args(const struct device_node *np, const char *list_name,
const char *cells_name, int index,
struct of_phandle_args *out_args)
{
Expand Down
2 changes: 1 addition & 1 deletion include/linux/of.h
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ extern int of_modalias_node(struct device_node *node, char *modalias, int len);
extern struct device_node *of_parse_phandle(const struct device_node *np,
const char *phandle_name,
int index);
extern int of_parse_phandle_with_args(struct device_node *np,
extern int of_parse_phandle_with_args(const struct device_node *np,
const char *list_name, const char *cells_name, int index,
struct of_phandle_args *out_args);

Expand Down

0 comments on commit 93c667c

Please sign in to comment.