X-Git-Url: http://git.openwrt.org/?a=blobdiff_plain;f=target%2Flinux%2Fgeneric%2Fpending-4.14%2F400-mtd-add-rootfs-split-support.patch;fp=target%2Flinux%2Fgeneric%2Fpending-4.14%2F400-mtd-add-rootfs-split-support.patch;h=68737803d8fb3b535b20cbb4f0e5c2abebe51a68;hb=2a598bbaa3f75b7051c2453a6ccf706191cf2153;hp=bc2272d26de249f81336967042ca6e288c72e9c0;hpb=4c1aa64b4d804e77dfaa8d53e5ef699fcced4b18;p=openwrt%2Fopenwrt.git diff --git a/target/linux/generic/pending-4.14/400-mtd-add-rootfs-split-support.patch b/target/linux/generic/pending-4.14/400-mtd-add-rootfs-split-support.patch index bc2272d26d..68737803d8 100644 --- a/target/linux/generic/pending-4.14/400-mtd-add-rootfs-split-support.patch +++ b/target/linux/generic/pending-4.14/400-mtd-add-rootfs-split-support.patch @@ -60,7 +60,7 @@ Signed-off-by: Felix Fietkau /* * Given a pointer to the MTD object in the mtd_part structure, we can retrieve * the pointer to that structure. -@@ -674,6 +678,7 @@ int mtd_add_partition(struct mtd_info *p +@@ -658,6 +662,7 @@ int mtd_add_partition(struct mtd_info *p mutex_unlock(&mtd_partitions_mutex); add_mtd_device(&new->mtd); @@ -68,7 +68,7 @@ Signed-off-by: Felix Fietkau mtd_add_partition_attrs(new); -@@ -752,6 +757,35 @@ int mtd_del_partition(struct mtd_info *m +@@ -736,6 +741,35 @@ int mtd_del_partition(struct mtd_info *m } EXPORT_SYMBOL_GPL(mtd_del_partition); @@ -104,14 +104,14 @@ Signed-off-by: Felix Fietkau /* * 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 -@@ -783,6 +817,7 @@ int add_mtd_partitions(struct mtd_info * +@@ -767,6 +801,7 @@ int add_mtd_partitions(struct mtd_info * mutex_unlock(&mtd_partitions_mutex); add_mtd_device(&slave->mtd); + mtd_partition_split(master, slave); mtd_add_partition_attrs(slave); - if (parts[i].types) - mtd_parse_part(slave, parts[i].types); + /* Look for subpartitions */ + parse_mtd_partitions(&slave->mtd, parts[i].types, NULL); --- a/include/linux/mtd/partitions.h +++ b/include/linux/mtd/partitions.h @@ -110,5 +110,7 @@ int mtd_add_partition(struct mtd_info *m