--- a/drivers/mtd/mtdpart.c
+++ b/drivers/mtd/mtdpart.c
-@@ -771,6 +771,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
-@@ -1228,6 +1239,24 @@ int mtd_is_partition(const struct mtd_in
+@@ -1228,6 +1228,24 @@ int mtd_is_partition(const struct mtd_in
}
EXPORT_SYMBOL_GPL(mtd_is_partition);
--- a/drivers/mtd/mtdpart.c
+++ b/drivers/mtd/mtdpart.c
-@@ -763,6 +763,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
-@@ -1225,6 +1236,24 @@ int mtd_is_partition(const struct mtd_in
+@@ -1225,6 +1225,24 @@ int mtd_is_partition(const struct mtd_in
}
EXPORT_SYMBOL_GPL(mtd_is_partition);