summaryrefslogtreecommitdiffstats
path: root/include/param.h
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2015-06-23 09:13:42 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2015-08-26 12:52:12 +0200
commit546c5a9c788eb63f3e3a0ed74f6498cc19c2b07d (patch)
tree20912085e85bf288198c375eb3d5bdc6bb6a87e3 /include/param.h
parentf38ba32965c5686c062884fab2e9f505015af82a (diff)
downloadbarebox-546c5a9c788eb63f3e3a0ed74f6498cc19c2b07d.tar.gz
barebox-546c5a9c788eb63f3e3a0ed74f6498cc19c2b07d.tar.xz
param_enum: Make name strings const
Not only the array containing the pointers should be const but also the strings themselves, so instead of using const char ** use const char * const *. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include/param.h')
-rw-r--r--include/param.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/param.h b/include/param.h
index 3a851fc552..3fb4740b3a 100644
--- a/include/param.h
+++ b/include/param.h
@@ -50,7 +50,7 @@ struct param_d *dev_add_param_bool(struct device_d *dev, const char *name,
struct param_d *dev_add_param_enum(struct device_d *dev, const char *name,
int (*set)(struct param_d *p, void *priv),
int (*get)(struct param_d *p, void *priv),
- int *value, const char **names, int max, void *priv);
+ int *value, const char * const *names, int max, void *priv);
struct param_d *dev_add_param_int_ro(struct device_d *dev, const char *name,
int value, const char *format);
@@ -120,7 +120,7 @@ static inline struct param_d *dev_add_param_int(struct device_d *dev, const char
static inline struct param_d *dev_add_param_enum(struct device_d *dev, const char *name,
int (*set)(struct param_d *p, void *priv),
int (*get)(struct param_d *p, void *priv),
- int *value, const char **names, int max, void *priv)
+ int *value, const char * const *names, int max, void *priv)
{
return ERR_PTR(-ENOSYS);