kernel: backport mtd support for subpartitions in DT
[openwrt/staging/chunkeey.git] / target / linux / generic / pending-4.14 / 161-mtd-part-add-generic-parsing-of-linux-part-probe.patch
index 0e858d93bba85a49826268aa6207a018d0502948..80ff556a49d87cfe0b289706ee486ea39d7a836b 100644 (file)
@@ -104,7 +104,7 @@ Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
  #include <linux/err.h>
  #include <linux/of.h>
  
-@@ -851,6 +852,32 @@ void deregister_mtd_parser(struct mtd_pa
+@@ -835,6 +836,32 @@ void deregister_mtd_parser(struct mtd_pa
  EXPORT_SYMBOL_GPL(deregister_mtd_parser);
  
  /*
@@ -137,7 +137,7 @@ Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
   * Do not forget to update 'parse_mtd_partitions()' kerneldoc comment if you
   * are changing this array!
   */
-@@ -991,6 +1018,13 @@ int parse_mtd_partitions(struct mtd_info
+@@ -983,6 +1010,13 @@ int parse_mtd_partitions(struct mtd_info
        struct mtd_partitions pparts = { };
        struct mtd_part_parser *parser;
        int ret, err = 0;
@@ -150,8 +150,8 @@ Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
 +      }
  
        if (!types)
-               types = default_mtd_part_types;
-@@ -1031,6 +1065,7 @@ int parse_mtd_partitions(struct mtd_info
+               types = mtd_is_partition(master) ? default_subpartition_types :
+@@ -1024,6 +1058,7 @@ int parse_mtd_partitions(struct mtd_info
                if (ret < 0 && !err)
                        err = ret;
        }