提交 f09bc831 编写于 作者: S Shawn Guo 提交者: Grant Likely

dt: add 'const' for of_property_read_string parameter **out_string

The existing dt codes usually call of_get_property to get a string
property and save it as a 'const char *'.  The patch adds'const' for
of_property_read_string parameter **out_string to make the converting
of existing code a little easier.
Signed-off-by: NShawn Guo <shawn.guo@linaro.org>
Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
上级 a3b85363
...@@ -639,7 +639,7 @@ EXPORT_SYMBOL_GPL(of_property_read_u32); ...@@ -639,7 +639,7 @@ EXPORT_SYMBOL_GPL(of_property_read_u32);
* The out_string pointer is modified only if a valid string can be decoded. * The out_string pointer is modified only if a valid string can be decoded.
*/ */
int of_property_read_string(struct device_node *np, char *propname, int of_property_read_string(struct device_node *np, char *propname,
char **out_string) const char **out_string)
{ {
struct property *prop = of_find_property(np, propname, NULL); struct property *prop = of_find_property(np, propname, NULL);
if (!prop) if (!prop)
......
...@@ -198,7 +198,7 @@ extern struct property *of_find_property(const struct device_node *np, ...@@ -198,7 +198,7 @@ extern struct property *of_find_property(const struct device_node *np,
extern int of_property_read_u32(struct device_node *np, char *propname, extern int of_property_read_u32(struct device_node *np, char *propname,
u32 *out_value); u32 *out_value);
extern int of_property_read_string(struct device_node *np, char *propname, extern int of_property_read_string(struct device_node *np, char *propname,
char **out_string); const char **out_string);
extern int of_device_is_compatible(const struct device_node *device, extern int of_device_is_compatible(const struct device_node *device,
const char *); const char *);
extern int of_device_is_available(const struct device_node *device); extern int of_device_is_available(const struct device_node *device);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册