aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/generic/patches-4.9/402-mtd-use-typed-mtd-parsers-for-rootfs-and-firmware-split.patch
diff options
context:
space:
mode:
authorRafał Miłecki <rafal@milecki.pl>2017-06-23 10:27:20 +0200
committerRafał Miłecki <rafal@milecki.pl>2017-06-23 11:40:05 +0200
commit8c1e760ab60994de26d2a2c85f91e86192999dfb (patch)
tree741281d011dac79b540cc69ed4cd39f6a426ecb8 /target/linux/generic/patches-4.9/402-mtd-use-typed-mtd-parsers-for-rootfs-and-firmware-split.patch
parent4052443a235433fb97af9711bf6429cd05820ba9 (diff)
downloadupstream-8c1e760ab60994de26d2a2c85f91e86192999dfb.tar.gz
upstream-8c1e760ab60994de26d2a2c85f91e86192999dfb.tar.bz2
upstream-8c1e760ab60994de26d2a2c85f91e86192999dfb.zip
kernel: backport upstream mtdpart.c cleanups
Except for renames and line changes the only conflict was in allocate_partition in handling MTD_WRITEABLE. Hopefully it was handled correctly. Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Diffstat (limited to 'target/linux/generic/patches-4.9/402-mtd-use-typed-mtd-parsers-for-rootfs-and-firmware-split.patch')
-rw-r--r--target/linux/generic/patches-4.9/402-mtd-use-typed-mtd-parsers-for-rootfs-and-firmware-split.patch10
1 files changed, 5 insertions, 5 deletions
diff --git a/target/linux/generic/patches-4.9/402-mtd-use-typed-mtd-parsers-for-rootfs-and-firmware-split.patch b/target/linux/generic/patches-4.9/402-mtd-use-typed-mtd-parsers-for-rootfs-and-firmware-split.patch
index 5bb69cffa9..02fb9cce3e 100644
--- a/target/linux/generic/patches-4.9/402-mtd-use-typed-mtd-parsers-for-rootfs-and-firmware-split.patch
+++ b/target/linux/generic/patches-4.9/402-mtd-use-typed-mtd-parsers-for-rootfs-and-firmware-split.patch
@@ -1,6 +1,6 @@
--- a/drivers/mtd/mtdpart.c
+++ b/drivers/mtd/mtdpart.c
-@@ -687,6 +687,36 @@ int mtd_del_partition(struct mtd_info *m
+@@ -723,6 +723,36 @@ int mtd_del_partition(struct mtd_info *m
}
EXPORT_SYMBOL_GPL(mtd_del_partition);
@@ -23,7 +23,7 @@
+ /* adjust partition offsets */
+ parts[i].offset += slave->offset;
+
-+ mtd_add_partition(slave->master,
++ mtd_add_partition(slave->parent,
+ parts[i].name,
+ parts[i].offset,
+ parts[i].size);
@@ -37,7 +37,7 @@
#ifdef CONFIG_MTD_SPLIT_FIRMWARE_NAME
#define SPLIT_FIRMWARE_NAME CONFIG_MTD_SPLIT_FIRMWARE_NAME
#else
-@@ -695,6 +725,7 @@ EXPORT_SYMBOL_GPL(mtd_del_partition);
+@@ -731,6 +761,7 @@ EXPORT_SYMBOL_GPL(mtd_del_partition);
static void split_firmware(struct mtd_info *master, struct mtd_part *part)
{
@@ -45,7 +45,7 @@
}
void __weak arch_split_mtd_part(struct mtd_info *master, const char *name,
-@@ -709,6 +740,12 @@ static void mtd_partition_split(struct m
+@@ -745,6 +776,12 @@ static void mtd_partition_split(struct m
if (rootfs_found)
return;
@@ -60,7 +60,7 @@
split_firmware(master, part);
--- a/include/linux/mtd/partitions.h
+++ b/include/linux/mtd/partitions.h
-@@ -66,6 +66,8 @@ struct mtd_part_parser_data {
+@@ -67,6 +67,8 @@ struct mtd_part_parser_data {
enum mtd_parser_type {
MTD_PARSER_TYPE_DEVICE = 0,