of: *node argument to of_parse_phandle_with_args should be const
authorGuennadi Liakhovetski <g.liakhovetski@gmx.de>
Mon, 10 Dec 2012 19:41:30 +0000 (20:41 +0100)
committerGrant Likely <grant.likely@secretlab.ca>
Tue, 11 Dec 2012 17:30:16 +0000 (17:30 +0000)
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>
drivers/of/base.c
include/linux/of.h

index 538e3cfad23e20c1dfca368a1e85adc53920c574..be846408dbc14e86dd5df8b2d511eac36be4c711 100644 (file)
@@ -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)
 {
index 60053bd7e79a8c835099c474aad86c030754a3ac..6cfea9aa401f766651956f97c389c0e209202279 100644 (file)
@@ -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);
 
This page took 0.049062 seconds and 5 git commands to generate.