aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/of.h
diff options
context:
space:
mode:
authorJamie Iles <jamie@jamieiles.com>2011-08-02 15:45:07 +0100
committerGrant Likely <grant.likely@secretlab.ca>2011-08-02 16:50:47 +0100
commitaac285c6cb9622f1cc05ed162604bf5ad2da9a8d (patch)
tree1cfcff20a178ad2c439484f74b0ffd77bd7feedf /include/linux/of.h
parent5f9288af065537be1fe6d1d5bd54ba51d6df721a (diff)
downloadkernel_goldelico_gta04-aac285c6cb9622f1cc05ed162604bf5ad2da9a8d.zip
kernel_goldelico_gta04-aac285c6cb9622f1cc05ed162604bf5ad2da9a8d.tar.gz
kernel_goldelico_gta04-aac285c6cb9622f1cc05ed162604bf5ad2da9a8d.tar.bz2
of: constify property name parameters for helper functions
The helper functions for reading u32 integers, u32 arrays and strings should have the property name as a const pointer. Cc: Grant Likely <grant.likely@secretlab.ca> Signed-off-by: Jamie Iles <jamie@jamieiles.com> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Diffstat (limited to 'include/linux/of.h')
-rw-r--r--include/linux/of.h15
1 files changed, 9 insertions, 6 deletions
diff --git a/include/linux/of.h b/include/linux/of.h
index bd716f8..0085bb0 100644
--- a/include/linux/of.h
+++ b/include/linux/of.h
@@ -196,12 +196,13 @@ extern struct property *of_find_property(const struct device_node *np,
const char *name,
int *lenp);
extern int of_property_read_u32_array(const struct device_node *np,
- char *propname,
+ const char *propname,
u32 *out_values,
size_t sz);
-extern int of_property_read_string(struct device_node *np, char *propname,
- const char **out_string);
+extern int of_property_read_string(struct device_node *np,
+ const char *propname,
+ const char **out_string);
extern int of_device_is_compatible(const struct device_node *device,
const char *);
extern int of_device_is_available(const struct device_node *device);
@@ -242,13 +243,15 @@ static inline bool of_have_populated_dt(void)
}
static inline int of_property_read_u32_array(const struct device_node *np,
- char *propname, u32 *out_values, size_t sz)
+ const char *propname,
+ u32 *out_values, size_t sz)
{
return -ENOSYS;
}
static inline int of_property_read_string(struct device_node *np,
- char *propname, const char **out_string)
+ const char *propname,
+ const char **out_string)
{
return -ENOSYS;
}
@@ -256,7 +259,7 @@ static inline int of_property_read_string(struct device_node *np,
#endif /* CONFIG_OF */
static inline int of_property_read_u32(const struct device_node *np,
- char *propname,
+ const char *propname,
u32 *out_value)
{
return of_property_read_u32_array(np, propname, out_value, 1);