From 2b4fbeb6d4f77fe3cb441a36f26a577166df381a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= Date: Sat, 13 Dec 2014 20:06:47 +0000 Subject: kernel: move old firmware uimage splitter into separated patch MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 SVN-Revision: 43696 --- .../405-mtd-add-more-helper-functions.patch | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) (limited to 'target/linux/generic/patches-3.18/405-mtd-add-more-helper-functions.patch') diff --git a/target/linux/generic/patches-3.18/405-mtd-add-more-helper-functions.patch b/target/linux/generic/patches-3.18/405-mtd-add-more-helper-functions.patch index b59166c..d7c3801 100644 --- a/target/linux/generic/patches-3.18/405-mtd-add-more-helper-functions.patch +++ b/target/linux/generic/patches-3.18/405-mtd-add-more-helper-functions.patch @@ -18,7 +18,25 @@ } if (slave->offset == MTDPART_OFS_RETAIN) { slave->offset = cur_offset; -@@ -957,6 +955,24 @@ int mtd_is_partition(const struct mtd_in +@@ -672,6 +670,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 +@@ -913,6 +922,24 @@ int mtd_is_partition(const struct mtd_in } EXPORT_SYMBOL_GPL(mtd_is_partition); -- cgit v1.1