aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuennadi Liakhovetski <g.liakhovetski@gmx.de>2012-12-10 14:41:30 -0500
committerGrant Likely <grant.likely@secretlab.ca>2012-12-11 12:30:16 -0500
commit93c667ca2598bd84f1bd3f2fa176af69707699fe (patch)
treef71861d55df741d0fee6232c7ae6d81744c42ed4
parent1daa8a0b2000974e07eacbabecd61bccadc933b9 (diff)
of: *node argument to of_parse_phandle_with_args should be const
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>
-rw-r--r--drivers/of/base.c2
-rw-r--r--include/linux/of.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/drivers/of/base.c b/drivers/of/base.c
index 538e3cfad23..be846408dbc 100644
--- a/drivers/of/base.c
+++ b/drivers/of/base.c
@@ -1025,7 +1025,7 @@ EXPORT_SYMBOL(of_parse_phandle);
1025 * To get a device_node of the `node2' node you may call this: 1025 * To get a device_node of the `node2' node you may call this:
1026 * of_parse_phandle_with_args(node3, "list", "#list-cells", 1, &args); 1026 * of_parse_phandle_with_args(node3, "list", "#list-cells", 1, &args);
1027 */ 1027 */
1028int of_parse_phandle_with_args(struct device_node *np, const char *list_name, 1028int of_parse_phandle_with_args(const struct device_node *np, const char *list_name,
1029 const char *cells_name, int index, 1029 const char *cells_name, int index,
1030 struct of_phandle_args *out_args) 1030 struct of_phandle_args *out_args)
1031{ 1031{
diff --git a/include/linux/of.h b/include/linux/of.h
index 60053bd7e79..6cfea9aa401 100644
--- a/include/linux/of.h
+++ b/include/linux/of.h
@@ -273,7 +273,7 @@ extern int of_modalias_node(struct device_node *node, char *modalias, int len);
273extern struct device_node *of_parse_phandle(const struct device_node *np, 273extern struct device_node *of_parse_phandle(const struct device_node *np,
274 const char *phandle_name, 274 const char *phandle_name,
275 int index); 275 int index);
276extern int of_parse_phandle_with_args(struct device_node *np, 276extern int of_parse_phandle_with_args(const struct device_node *np,
277 const char *list_name, const char *cells_name, int index, 277 const char *list_name, const char *cells_name, int index,
278 struct of_phandle_args *out_args); 278 struct of_phandle_args *out_args);
279 279