From 4d0431801d447ee8cffe96289ee531c67b795c1c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= Date: Tue, 20 Nov 2018 13:42:19 +0100 Subject: kernel: don't export parse_mtd_partitions_by_type() in 4.9 and 4.14 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit That function isn't used anywhere out of the mtdpart.c & can be static. Signed-off-by: Rafał Miłecki --- ...port-for-different-partition-parser-types.patch | 41 ++++++++++------------ 1 file changed, 18 insertions(+), 23 deletions(-) (limited to 'target/linux/generic/pending-4.14/401-mtd-add-support-for-different-partition-parser-types.patch') diff --git a/target/linux/generic/pending-4.14/401-mtd-add-support-for-different-partition-parser-types.patch b/target/linux/generic/pending-4.14/401-mtd-add-support-for-different-partition-parser-types.patch index a683db359f..9dd1eaf04f 100644 --- a/target/linux/generic/pending-4.14/401-mtd-add-support-for-different-partition-parser-types.patch +++ b/target/linux/generic/pending-4.14/401-mtd-add-support-for-different-partition-parser-types.patch @@ -9,7 +9,18 @@ Signed-off-by: Gabor Juhos --- a/drivers/mtd/mtdpart.c +++ b/drivers/mtd/mtdpart.c -@@ -1118,6 +1118,62 @@ void mtd_part_parser_cleanup(struct mtd_ +@@ -56,6 +56,10 @@ struct mtd_part { + }; + + static void mtd_partition_split(struct mtd_info *master, struct mtd_part *part); ++static int parse_mtd_partitions_by_type(struct mtd_info *master, ++ enum mtd_parser_type type, ++ const struct mtd_partition **pparts, ++ struct mtd_part_parser_data *data); + + /* + * Given a pointer to the MTD object in the mtd_part structure, we can retrieve +@@ -1118,6 +1122,61 @@ void mtd_part_parser_cleanup(struct mtd_ } } @@ -37,10 +48,10 @@ Signed-off-by: Gabor Juhos + return ret; +} + -+int parse_mtd_partitions_by_type(struct mtd_info *master, -+ enum mtd_parser_type type, -+ const struct mtd_partition **pparts, -+ struct mtd_part_parser_data *data) ++static int parse_mtd_partitions_by_type(struct mtd_info *master, ++ enum mtd_parser_type type, ++ const struct mtd_partition **pparts, ++ struct mtd_part_parser_data *data) +{ + struct mtd_part_parser *prev = NULL; + int ret = 0; @@ -67,19 +78,13 @@ Signed-off-by: Gabor Juhos + + return ret; +} -+EXPORT_SYMBOL_GPL(parse_mtd_partitions_by_type); + int mtd_is_partition(const struct mtd_info *mtd) { struct mtd_part *part; --- a/include/linux/mtd/partitions.h +++ b/include/linux/mtd/partitions.h -@@ -68,11 +68,14 @@ struct mtd_part_parser_data { - unsigned long origin; - }; - -- - /* +@@ -73,6 +73,10 @@ struct mtd_part_parser_data { * Functions dealing with the various ways of partitioning the space */ @@ -90,7 +95,7 @@ Signed-off-by: Gabor Juhos struct mtd_part_parser { struct list_head list; struct module *owner; -@@ -81,6 +84,7 @@ struct mtd_part_parser { +@@ -81,6 +85,7 @@ struct mtd_part_parser { int (*parse_fn)(struct mtd_info *, const struct mtd_partition **, struct mtd_part_parser_data *); void (*cleanup)(const struct mtd_partition *pparts, int nr_parts); @@ -98,13 +103,3 @@ Signed-off-by: Gabor Juhos }; /* Container for passing around a set of parsed partitions */ -@@ -113,4 +117,9 @@ uint64_t mtd_get_device_size(const struc - extern void __weak arch_split_mtd_part(struct mtd_info *master, - const char *name, int offset, int size); - -+int parse_mtd_partitions_by_type(struct mtd_info *master, -+ enum mtd_parser_type type, -+ const struct mtd_partition **pparts, -+ struct mtd_part_parser_data *data); -+ - #endif -- cgit v1.2.3