aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/generic/patches-3.14/405-mtd-add-more-helper-functions.patch
diff options
context:
space:
mode:
authorRafał Miłecki <zajec5@gmail.com>2014-12-13 20:06:47 +0000
committerRafał Miłecki <zajec5@gmail.com>2014-12-13 20:06:47 +0000
commitd118689cb79412586704fe4ebe9a15611a975485 (patch)
treeaae8663ffd77c07bfc17a7e44cc392873358f530 /target/linux/generic/patches-3.14/405-mtd-add-more-helper-functions.patch
parentaa4cbcc9bbdaa824856d4feb9e2ead156e263a39 (diff)
downloadmaster-187ad058-d118689cb79412586704fe4ebe9a15611a975485.tar.gz
master-187ad058-d118689cb79412586704fe4ebe9a15611a975485.tar.bz2
master-187ad058-d118689cb79412586704fe4ebe9a15611a975485.zip
kernel: move old firmware uimage splitter into separated patch
This will allow us to drop it in the future. This patch doesn't change the final mtdpart.c, it remains the same. Signed-off-by: Rafał Miłecki <zajec5@gmail.com> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@43696 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/generic/patches-3.14/405-mtd-add-more-helper-functions.patch')
-rw-r--r--target/linux/generic/patches-3.14/405-mtd-add-more-helper-functions.patch20
1 files changed, 19 insertions, 1 deletions
diff --git a/target/linux/generic/patches-3.14/405-mtd-add-more-helper-functions.patch b/target/linux/generic/patches-3.14/405-mtd-add-more-helper-functions.patch
index 30292e9316..f3f957b33f 100644
--- a/target/linux/generic/patches-3.14/405-mtd-add-more-helper-functions.patch
+++ b/target/linux/generic/patches-3.14/405-mtd-add-more-helper-functions.patch
@@ -18,7 +18,25 @@
}
if (slave->offset == MTDPART_OFS_RETAIN) {
slave->offset = cur_offset;
-@@ -944,6 +942,24 @@ int mtd_is_partition(const struct mtd_in
+@@ -659,6 +657,17 @@ run_parsers_by_type(struct mtd_part *sla
+ return nr_parts;
+ }
+
++static inline unsigned long
++mtd_pad_erasesize(struct mtd_info *mtd, int offset, int len)
++{
++ unsigned long mask = mtd->erasesize - 1;
++
++ len += offset & mask;
++ len = (len + mask) & ~mask;
++ len -= offset & mask;
++ return len;
++}
++
+ #ifdef CONFIG_MTD_SPLIT_FIRMWARE_NAME
+ #define SPLIT_FIRMWARE_NAME CONFIG_MTD_SPLIT_FIRMWARE_NAME
+ #else
+@@ -900,6 +909,24 @@ int mtd_is_partition(const struct mtd_in
}
EXPORT_SYMBOL_GPL(mtd_is_partition);