kernel: backport upstream mtd support for partition parsers

In a log term it should replace our implementation. For now both can
coexist.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
This commit is contained in:
Rafał Miłecki
2017-06-23 10:47:18 +02:00
parent 8c1e760ab6
commit 4d5f296af8
9 changed files with 229 additions and 23 deletions

View File

@@ -1,6 +1,6 @@
--- a/drivers/mtd/mtdpart.c
+++ b/drivers/mtd/mtdpart.c
@@ -753,6 +753,17 @@ run_parsers_by_type(struct mtd_part *sla
@@ -791,6 +791,17 @@ run_parsers_by_type(struct mtd_part *sla
return nr_parts;
}
@@ -18,7 +18,7 @@
#ifdef CONFIG_MTD_SPLIT_FIRMWARE_NAME
#define SPLIT_FIRMWARE_NAME CONFIG_MTD_SPLIT_FIRMWARE_NAME
#else
@@ -1106,6 +1117,24 @@ int mtd_is_partition(const struct mtd_in
@@ -1146,6 +1157,24 @@ int mtd_is_partition(const struct mtd_in
}
EXPORT_SYMBOL_GPL(mtd_is_partition);
@@ -45,7 +45,7 @@
{
--- a/include/linux/mtd/partitions.h
+++ b/include/linux/mtd/partitions.h
@@ -107,6 +107,8 @@ int mtd_is_partition(const struct mtd_in
@@ -114,6 +114,8 @@ int mtd_is_partition(const struct mtd_in
int mtd_add_partition(struct mtd_info *master, const char *name,
long long offset, long long length);
int mtd_del_partition(struct mtd_info *master, int partno);