diff options
author | Rafał Miłecki <zajec5@gmail.com> | 2015-12-04 09:33:08 +0000 |
---|---|---|
committer | Rafał Miłecki <zajec5@gmail.com> | 2015-12-04 09:33:08 +0000 |
commit | 304c3411baac0f77b38f97360072c36a5ac8479b (patch) | |
tree | 6f36996baf99f0423efd5660feb7c5e39e68803d /target/linux/generic/patches-4.4/400-mtd-add-rootfs-split-support.patch | |
parent | 416243107bedcc4d0f85ab22eadcdd0279ea48de (diff) | |
download | upstream-304c3411baac0f77b38f97360072c36a5ac8479b.tar.gz upstream-304c3411baac0f77b38f97360072c36a5ac8479b.tar.bz2 upstream-304c3411baac0f77b38f97360072c36a5ac8479b.zip |
kernel: drop unneeded modification of mtd_add_partition function
In old days mtd_add_partition was checking for partitions overlapping
which was breaking our splitting feature. We had to modify this function
by adding an extra bool dup_check parameter. Upstream commit:
3a434f66e6da ("mtd: part: Remove partition overlap checks")
removed that check so we don't need our modification anymore.
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
SVN-Revision: 47748
Diffstat (limited to 'target/linux/generic/patches-4.4/400-mtd-add-rootfs-split-support.patch')
-rw-r--r-- | target/linux/generic/patches-4.4/400-mtd-add-rootfs-split-support.patch | 41 |
1 files changed, 4 insertions, 37 deletions
diff --git a/target/linux/generic/patches-4.4/400-mtd-add-rootfs-split-support.patch b/target/linux/generic/patches-4.4/400-mtd-add-rootfs-split-support.patch index 74a0ecdcef..7925caf97c 100644 --- a/target/linux/generic/patches-4.4/400-mtd-add-rootfs-split-support.patch +++ b/target/linux/generic/patches-4.4/400-mtd-add-rootfs-split-support.patch @@ -40,7 +40,7 @@ /* Our partition linked list */ static LIST_HEAD(mtd_partitions); -@@ -47,13 +49,14 @@ struct mtd_part { +@@ -47,6 +49,8 @@ struct mtd_part { struct list_head list; }; @@ -49,27 +49,7 @@ /* * Given a pointer to the MTD object in the mtd_part structure, we can retrieve * the pointer to that structure with this macro. - */ - #define PART(x) ((struct mtd_part *)(x)) - -- - /* - * MTD methods which simply translate the effective address and pass through - * to the _real_ device. -@@ -579,8 +582,10 @@ static int mtd_add_partition_attrs(struc - return ret; - } - --int mtd_add_partition(struct mtd_info *master, const char *name, -- long long offset, long long length) -+ -+static int -+__mtd_add_partition(struct mtd_info *master, const char *name, -+ long long offset, long long length, bool dup_check) - { - struct mtd_partition part; - struct mtd_part *new; -@@ -612,6 +617,7 @@ int mtd_add_partition(struct mtd_info *m +@@ -612,6 +616,7 @@ int mtd_add_partition(struct mtd_info *m mutex_unlock(&mtd_partitions_mutex); add_mtd_device(&new->mtd); @@ -77,20 +57,7 @@ mtd_add_partition_attrs(new); -@@ -619,6 +625,12 @@ int mtd_add_partition(struct mtd_info *m - } - EXPORT_SYMBOL_GPL(mtd_add_partition); - -+int mtd_add_partition(struct mtd_info *master, const char *name, -+ long long offset, long long length) -+{ -+ return __mtd_add_partition(master, name, offset, length, true); -+} -+ - int mtd_del_partition(struct mtd_info *master, int partno) - { - struct mtd_part *slave, *next; -@@ -644,6 +656,35 @@ int mtd_del_partition(struct mtd_info *m +@@ -644,6 +649,35 @@ int mtd_del_partition(struct mtd_info *m } EXPORT_SYMBOL_GPL(mtd_del_partition); @@ -126,7 +93,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 -@@ -675,6 +716,7 @@ int add_mtd_partitions(struct mtd_info * +@@ -675,6 +709,7 @@ int add_mtd_partitions(struct mtd_info * mutex_unlock(&mtd_partitions_mutex); add_mtd_device(&slave->mtd); |