kernel: don't auto-split "firmware" if it has "compatible" DT property
[openwrt/openwrt.git] / target / linux / generic / pending-4.14 / 404-mtd-add-more-helper-functions.patch
index 5df24dff0914caafddce996c633c84ff4185223d..d1035b67380db1c6663075a1e8f22fb5276c4332 100644 (file)
@@ -11,25 +11,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
 
 --- 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
-@@ -1223,6 +1234,24 @@ int mtd_is_partition(const struct mtd_in
+@@ -1232,6 +1232,24 @@ int mtd_is_partition(const struct mtd_in
  }
  EXPORT_SYMBOL_GPL(mtd_is_partition);
  
@@ -83,7 +65,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
        if (mtd->writesize_shift)
 --- a/include/linux/mtd/partitions.h
 +++ b/include/linux/mtd/partitions.h
-@@ -115,6 +115,8 @@ int mtd_is_partition(const struct mtd_in
+@@ -116,6 +116,8 @@ int mtd_is_partition(const struct mtd_in
  int mtd_add_partition(struct mtd_info *master, const char *name,
                      long long offset, long long length);
  int mtd_del_partition(struct mtd_info *master, int partno);