aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/generic/patches-4.4/400-mtd-add-rootfs-split-support.patch
diff options
context:
space:
mode:
authorRafał Miłecki <zajec5@gmail.com>2015-12-04 09:33:08 +0000
committerRafał Miłecki <zajec5@gmail.com>2015-12-04 09:33:08 +0000
commit4d71d66b4f1c93cbebed3b7bda7bb536332a0518 (patch)
treed236332ef1a661e214e3a791622dac01d33b4e9b /target/linux/generic/patches-4.4/400-mtd-add-rootfs-split-support.patch
parentcc849c9ff6b5d371d4e9eeca45fc6a28893cd79a (diff)
downloadmaster-187ad058-4d71d66b4f1c93cbebed3b7bda7bb536332a0518.tar.gz
master-187ad058-4d71d66b4f1c93cbebed3b7bda7bb536332a0518.tar.bz2
master-187ad058-4d71d66b4f1c93cbebed3b7bda7bb536332a0518.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> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@47748 3c298f89-4303-0410-b956-a3cf2f4a3e73
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.patch41
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);