[PATCH v2 04/10] mtd/nand: constify filename parameter
Uwe Kleine-König
u.kleine-koenig at pengutronix.de
Thu Feb 27 15:39:04 EST 2014
The string pointed to isn't modified, so declare it as const.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig at pengutronix.de>
---
drivers/mtd/nand/nand-bb.c | 2 +-
include/nand.h | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/mtd/nand/nand-bb.c b/drivers/mtd/nand/nand-bb.c
index 0292f2f426c0..f387ef687a9b 100644
--- a/drivers/mtd/nand/nand-bb.c
+++ b/drivers/mtd/nand/nand-bb.c
@@ -261,7 +261,7 @@ static LIST_HEAD(bb_list);
* @param[in] name Partition name (can be obtained with devinfo command)
* @return The device representing the new partition.
*/
-int dev_add_bb_dev(char *path, const char *name)
+int dev_add_bb_dev(const char *path, const char *name)
{
struct nand_bb *bb;
int ret = -ENOMEM;
diff --git a/include/nand.h b/include/nand.h
index b1762dfa4591..a0e77cc8cde0 100644
--- a/include/nand.h
+++ b/include/nand.h
@@ -5,10 +5,10 @@
struct nand_bb;
#ifdef CONFIG_NAND
-int dev_add_bb_dev(char *filename, const char *name);
+int dev_add_bb_dev(const char *filename, const char *name);
int dev_remove_bb_dev(const char *name);
#else
-static inline int dev_add_bb_dev(char *filename, const char *name) {
+static inline int dev_add_bb_dev(const char *filename, const char *name) {
return 0;
}
static inline int dev_remove_bb_dev(const char *name)
--
1.8.5.3
More information about the barebox
mailing list