aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/generic/backport-4.14/041-v4.17-0002-mtd-rename-ofpart-parser-to-fixed-partitions-as-it-f.patch
diff options
context:
space:
mode:
authorRafał Miłecki <rafal@milecki.pl>2018-04-09 07:14:04 +0200
committerRafał Miłecki <rafal@milecki.pl>2018-04-09 07:16:48 +0200
commitcdcd5c93d733f6c0d6c2b21b98f5793310b867a2 (patch)
treeddb6f927adb446eca2690e644f32c4344a779ab8 /target/linux/generic/backport-4.14/041-v4.17-0002-mtd-rename-ofpart-parser-to-fixed-partitions-as-it-f.patch
parentdda5d9b78643ca2a943759278c2ef50d595cb509 (diff)
downloadupstream-cdcd5c93d733f6c0d6c2b21b98f5793310b867a2.tar.gz
upstream-cdcd5c93d733f6c0d6c2b21b98f5793310b867a2.tar.bz2
upstream-cdcd5c93d733f6c0d6c2b21b98f5793310b867a2.zip
kernel: use accepted mtd patchset adding support for "compatible" string
These patches were finally accepted and are already present in the Linus's tree. This should be good enough to make is "backport" material. Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Diffstat (limited to 'target/linux/generic/backport-4.14/041-v4.17-0002-mtd-rename-ofpart-parser-to-fixed-partitions-as-it-f.patch')
-rw-r--r--target/linux/generic/backport-4.14/041-v4.17-0002-mtd-rename-ofpart-parser-to-fixed-partitions-as-it-f.patch74
1 files changed, 74 insertions, 0 deletions
diff --git a/target/linux/generic/backport-4.14/041-v4.17-0002-mtd-rename-ofpart-parser-to-fixed-partitions-as-it-f.patch b/target/linux/generic/backport-4.14/041-v4.17-0002-mtd-rename-ofpart-parser-to-fixed-partitions-as-it-f.patch
new file mode 100644
index 0000000000..66b67d7676
--- /dev/null
+++ b/target/linux/generic/backport-4.14/041-v4.17-0002-mtd-rename-ofpart-parser-to-fixed-partitions-as-it-f.patch
@@ -0,0 +1,74 @@
+From c0faf43482e7f7dfb6d61847cb93d17748560b24 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl>
+Date: Wed, 14 Mar 2018 13:10:43 +0100
+Subject: [PATCH] mtd: rename "ofpart" parser to "fixed-partitions" as it fits
+ it better
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Type "ofpart" means that OF should be used to get partitioning info and
+this driver supports "fixed-partitions" binding only. Renaming it should
+lead to less confusion especially when parsers for new compatibility
+strings start to appear.
+
+Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
+Reviewed-by: Richard Weinberger <richard@nod.at>
+Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
+---
+ drivers/mtd/mtdpart.c | 4 ++--
+ drivers/mtd/ofpart.c | 11 ++++++-----
+ 2 files changed, 8 insertions(+), 7 deletions(-)
+
+--- a/drivers/mtd/mtdpart.c
++++ b/drivers/mtd/mtdpart.c
+@@ -940,7 +940,7 @@ static int mtd_part_of_parse(struct mtd_
+ struct device_node *np;
+ struct property *prop;
+ const char *compat;
+- const char *fixed = "ofpart";
++ const char *fixed = "fixed-partitions";
+ int ret, err = 0;
+
+ np = of_get_child_by_name(mtd_get_of_node(master), "partitions");
+@@ -960,7 +960,7 @@ static int mtd_part_of_parse(struct mtd_
+ of_node_put(np);
+
+ /*
+- * For backward compatibility we have to try the "ofpart"
++ * For backward compatibility we have to try the "fixed-partitions"
+ * parser. It supports old DT format with partitions specified as a
+ * direct subnodes of a flash device DT node without any compatibility
+ * specified we could match.
+--- a/drivers/mtd/ofpart.c
++++ b/drivers/mtd/ofpart.c
+@@ -25,9 +25,9 @@ static bool node_has_compatible(struct d
+ return of_get_property(pp, "compatible", NULL);
+ }
+
+-static int parse_ofpart_partitions(struct mtd_info *master,
+- const struct mtd_partition **pparts,
+- struct mtd_part_parser_data *data)
++static int parse_fixed_partitions(struct mtd_info *master,
++ const struct mtd_partition **pparts,
++ struct mtd_part_parser_data *data)
+ {
+ struct mtd_partition *parts;
+ struct device_node *mtd_node;
+@@ -141,8 +141,8 @@ ofpart_none:
+ }
+
+ static struct mtd_part_parser ofpart_parser = {
+- .parse_fn = parse_ofpart_partitions,
+- .name = "ofpart",
++ .parse_fn = parse_fixed_partitions,
++ .name = "fixed-partitions",
+ };
+
+ static int parse_ofoldpart_partitions(struct mtd_info *master,
+@@ -229,4 +229,5 @@ MODULE_AUTHOR("Vitaly Wool, David Gibson
+ * with the same name. Since we provide the ofoldpart parser, we should have
+ * the corresponding alias.
+ */
++MODULE_ALIAS("fixed-partitions");
+ MODULE_ALIAS("ofoldpart");