From: Richard Genoud Date: Tue, 10 Jul 2012 16:23:39 +0000 (+0200) Subject: mtd: mark mtd_is_partition argument as constant X-Git-Tag: v3.7-rc1~131^2~16 X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=commitdiff_plain;h=5dee4674c8dd4398f4806aae153888319c7e2be9;p=linux.git mtd: mark mtd_is_partition argument as constant 'struct mtd_info' is not modified by 'mtd_is_partition()' so it can be marked as "const". Signed-off-by: Richard Genoud Signed-off-by: Artem Bityutskiy --- diff --git a/drivers/mtd/mtdpart.c b/drivers/mtd/mtdpart.c index d518e4db8a0b..85005846f30d 100644 --- a/drivers/mtd/mtdpart.c +++ b/drivers/mtd/mtdpart.c @@ -744,7 +744,7 @@ int parse_mtd_partitions(struct mtd_info *master, const char **types, return ret; } -int mtd_is_partition(struct mtd_info *mtd) +int mtd_is_partition(const struct mtd_info *mtd) { struct mtd_part *part; int ispart = 0; diff --git a/include/linux/mtd/partitions.h b/include/linux/mtd/partitions.h index 2475228c1158..02a51157a173 100644 --- a/include/linux/mtd/partitions.h +++ b/include/linux/mtd/partitions.h @@ -79,7 +79,7 @@ struct mtd_part_parser { extern int register_mtd_parser(struct mtd_part_parser *parser); extern int deregister_mtd_parser(struct mtd_part_parser *parser); -int mtd_is_partition(struct mtd_info *mtd); +int mtd_is_partition(const struct mtd_info *mtd); int mtd_add_partition(struct mtd_info *master, char *name, long long offset, long long length); int mtd_del_partition(struct mtd_info *master, int partno);