aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/generic/pending-4.14/401-mtd-add-support-for-different-partition-parser-types.patch
diff options
context:
space:
mode:
authorRafał Miłecki <rafal@milecki.pl>2018-11-20 13:42:19 +0100
committerRafał Miłecki <rafal@milecki.pl>2018-11-20 14:44:01 +0100
commit4d0431801d447ee8cffe96289ee531c67b795c1c (patch)
tree6bcdecbdeec86c374db150b38eb21b002791e9f2 /target/linux/generic/pending-4.14/401-mtd-add-support-for-different-partition-parser-types.patch
parent48d8d46d331cd866ad5717cc5b090223a1856a4a (diff)
downloadupstream-4d0431801d447ee8cffe96289ee531c67b795c1c.tar.gz
upstream-4d0431801d447ee8cffe96289ee531c67b795c1c.tar.bz2
upstream-4d0431801d447ee8cffe96289ee531c67b795c1c.zip
kernel: don't export parse_mtd_partitions_by_type() in 4.9 and 4.14
That function isn't used anywhere out of the mtdpart.c & can be static. Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Diffstat (limited to 'target/linux/generic/pending-4.14/401-mtd-add-support-for-different-partition-parser-types.patch')
-rw-r--r--target/linux/generic/pending-4.14/401-mtd-add-support-for-different-partition-parser-types.patch41
1 files changed, 18 insertions, 23 deletions
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 <juhosg@openwrt.org>
--- 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 <juhosg@openwrt.org>
+ 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 <juhosg@openwrt.org>
+
+ 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 <juhosg@openwrt.org>
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 <juhosg@openwrt.org>
};
/* 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