path: root/include
diff options
authorSascha Hauer <>2012-04-23 13:01:00 +0200
committerSascha Hauer <>2012-04-24 11:17:02 +0200
commit51f2ded17c35c146488f6f3b697764bb2953a156 (patch)
tree3f3d159458d99828fcf6aec6922d3de1d655e74c /include
parent80b5293bcadfd40f50ecb030e4d3f52eac670a3f (diff)
param: make return value of param getter function const
The string returned by the getter function should not be changed. Make it const. Signed-off-by: Sascha Hauer <>
Diffstat (limited to 'include')
1 files changed, 3 insertions, 3 deletions
diff --git a/include/param.h b/include/param.h
index 4a39dc7..e7b66a4 100644
--- a/include/param.h
+++ b/include/param.h
@@ -10,7 +10,7 @@ struct device_d;
typedef unsigned long IPaddr_t;
struct param_d {
- char* (*get)(struct device_d *, struct param_d *param);
+ const char* (*get)(struct device_d *, struct param_d *param);
int (*set)(struct device_d *, struct param_d *param, const char *val);
unsigned int flags;
char *name;
@@ -24,9 +24,9 @@ const char *dev_get_param(struct device_d *dev, const char *name);
int dev_set_param(struct device_d *dev, const char *name, const char *val);
struct param_d *get_param_by_name(struct device_d *dev, const char *name);
-int dev_add_param(struct device_d *dev, char *name,
+int dev_add_param(struct device_d *dev, const char *name,
int (*set)(struct device_d *dev, struct param_d *p, const char *val),
- char *(*get)(struct device_d *, struct param_d *p),
+ const char *(*get)(struct device_d *, struct param_d *p),
unsigned long flags);
int dev_add_param_fixed(struct device_d *dev, char *name, char *value);