summaryrefslogtreecommitdiffstats
path: root/include/param.h
diff options
context:
space:
mode:
authorJosh Cartwright <joshc@eso.teric.us>2013-03-19 10:22:48 -0500
committerSascha Hauer <s.hauer@pengutronix.de>2013-04-02 08:29:02 +0200
commit74406ae9ad68fef4c294f1e9b4eb9b0bba74047d (patch)
tree146e34ffdce3643dfd0d7ff44f867badc53f3777 /include/param.h
parent5b856e44fb78ceb2bfc631609bb1227026879f29 (diff)
downloadbarebox-74406ae9ad68fef4c294f1e9b4eb9b0bba74047d.tar.gz
barebox-74406ae9ad68fef4c294f1e9b4eb9b0bba74047d.tar.xz
parameter: fix build warning when !CONFIG_PARAMETER
Commit 51f2ded17c35c146488f6f3b697764bb2953a156 ("param: make return value of param getter function const") made the parameter getter const, but neglected to change the dev_add_param() function prototype in the !CONFIG_PARAMETER case. Fixes the following warning with CONFIG_NAND and !CONFIG_PARAMETER: drivers/mtd/nand/nand_base.c: In function 'add_mtd_nand_device': drivers/mtd/nand/nand_base.c:1720:2: warning: passing argument 4 of 'dev_add_param' from incompatible pointer type [enabled by default] include/param.h:59:19: note: expected 'char * (*)(struct device_d *, struct param_d *)' but argument is of type 'const char * (*)(struct device_d *, struct param_d *)' Signed-off-by: Josh Cartwright <joshc@eso.teric.us> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include/param.h')
-rw-r--r--include/param.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/param.h b/include/param.h
index 21f4f7d832..3a585cd193 100644
--- a/include/param.h
+++ b/include/param.h
@@ -58,7 +58,7 @@ static inline struct param_d *get_param_by_name(struct device_d *dev,
static inline int dev_add_param(struct device_d *dev, 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)
{
return 0;