From b9adf469f8abb8a66f5795bbd8fe50fe201a14a1 Mon Sep 17 00:00:00 2001 From: Brian Norris Date: Fri, 4 Dec 2015 15:25:14 -0800 Subject: mtd: partitions: make parsers return 'const' partition arrays We only want to modify these arrays inside the parser "drivers", so the drivers should construct them however they like, then return them as immutable arrays. This will make other refactorings easier. Signed-off-by: Brian Norris Reviewed-by: Boris Brezillon --- drivers/mtd/ofpart.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers/mtd/ofpart.c') diff --git a/drivers/mtd/ofpart.c b/drivers/mtd/ofpart.c index c7df2f1dd6b8..ede407d6e106 100644 --- a/drivers/mtd/ofpart.c +++ b/drivers/mtd/ofpart.c @@ -26,7 +26,7 @@ static bool node_has_compatible(struct device_node *pp) } static int parse_ofpart_partitions(struct mtd_info *master, - struct mtd_partition **pparts, + const struct mtd_partition **pparts, struct mtd_part_parser_data *data) { struct mtd_partition *parts; @@ -145,7 +145,7 @@ static struct mtd_part_parser ofpart_parser = { }; static int parse_ofoldpart_partitions(struct mtd_info *master, - struct mtd_partition **pparts, + const struct mtd_partition **pparts, struct mtd_part_parser_data *data) { struct mtd_partition *parts; -- cgit v1.2.3