From 8c1e760ab60994de26d2a2c85f91e86192999dfb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= Date: Fri, 23 Jun 2017 10:27:20 +0200 Subject: kernel: backport upstream mtdpart.c cleanups MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- .../patches-4.9/400-mtd-add-rootfs-split-support.patch | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'target/linux/generic/patches-4.9/400-mtd-add-rootfs-split-support.patch') diff --git a/target/linux/generic/patches-4.9/400-mtd-add-rootfs-split-support.patch b/target/linux/generic/patches-4.9/400-mtd-add-rootfs-split-support.patch index d6c6486eef..bc402a2c11 100644 --- a/target/linux/generic/patches-4.9/400-mtd-add-rootfs-split-support.patch +++ b/target/linux/generic/patches-4.9/400-mtd-add-rootfs-split-support.patch @@ -39,7 +39,7 @@ /* Our partition linked list */ static LIST_HEAD(mtd_partitions); -@@ -46,6 +48,8 @@ struct mtd_part { +@@ -52,6 +54,8 @@ struct mtd_part { struct list_head list; }; @@ -48,15 +48,15 @@ /* * Given a pointer to the MTD object in the mtd_part structure, we can retrieve * the pointer to that structure. -@@ -650,6 +654,7 @@ int mtd_add_partition(struct mtd_info *m +@@ -649,6 +653,7 @@ int mtd_add_partition(struct mtd_info *p mutex_unlock(&mtd_partitions_mutex); add_mtd_device(&new->mtd); -+ mtd_partition_split(master, new); ++ mtd_partition_split(parent, new); mtd_add_partition_attrs(new); -@@ -682,6 +687,35 @@ int mtd_del_partition(struct mtd_info *m +@@ -718,6 +723,35 @@ int mtd_del_partition(struct mtd_info *m } EXPORT_SYMBOL_GPL(mtd_del_partition); @@ -92,7 +92,7 @@ /* * This function, given a master MTD object and a partition table, creates * and registers slave MTD objects which are bound to the master according to -@@ -713,6 +747,7 @@ int add_mtd_partitions(struct mtd_info * +@@ -749,6 +783,7 @@ int add_mtd_partitions(struct mtd_info * mutex_unlock(&mtd_partitions_mutex); add_mtd_device(&slave->mtd); @@ -102,7 +102,7 @@ cur_offset = slave->offset + slave->mtd.size; --- a/include/linux/mtd/partitions.h +++ b/include/linux/mtd/partitions.h -@@ -101,5 +101,7 @@ int mtd_add_partition(struct mtd_info *m +@@ -102,5 +102,7 @@ int mtd_add_partition(struct mtd_info *m long long offset, long long length); int mtd_del_partition(struct mtd_info *master, int partno); uint64_t mtd_get_device_size(const struct mtd_info *mtd); -- cgit v1.2.3