1 From c0faf43482e7f7dfb6d61847cb93d17748560b24 Mon Sep 17 00:00:00 2001
2 From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl>
3 Date: Wed, 14 Mar 2018 13:10:43 +0100
4 Subject: [PATCH] mtd: rename "ofpart" parser to "fixed-partitions" as it fits
7 Content-Type: text/plain; charset=UTF-8
8 Content-Transfer-Encoding: 8bit
10 Type "ofpart" means that OF should be used to get partitioning info and
11 this driver supports "fixed-partitions" binding only. Renaming it should
12 lead to less confusion especially when parsers for new compatibility
13 strings start to appear.
15 Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
16 Reviewed-by: Richard Weinberger <richard@nod.at>
17 Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
19 drivers/mtd/mtdpart.c | 4 ++--
20 drivers/mtd/ofpart.c | 11 ++++++-----
21 2 files changed, 8 insertions(+), 7 deletions(-)
23 --- a/drivers/mtd/mtdpart.c
24 +++ b/drivers/mtd/mtdpart.c
25 @@ -940,7 +940,7 @@ static int mtd_part_of_parse(struct mtd_
26 struct device_node *np;
27 struct property *prop;
29 - const char *fixed = "ofpart";
30 + const char *fixed = "fixed-partitions";
33 np = of_get_child_by_name(mtd_get_of_node(master), "partitions");
34 @@ -960,7 +960,7 @@ static int mtd_part_of_parse(struct mtd_
38 - * For backward compatibility we have to try the "ofpart"
39 + * For backward compatibility we have to try the "fixed-partitions"
40 * parser. It supports old DT format with partitions specified as a
41 * direct subnodes of a flash device DT node without any compatibility
42 * specified we could match.
43 --- a/drivers/mtd/ofpart.c
44 +++ b/drivers/mtd/ofpart.c
45 @@ -25,9 +25,9 @@ static bool node_has_compatible(struct d
46 return of_get_property(pp, "compatible", NULL);
49 -static int parse_ofpart_partitions(struct mtd_info *master,
50 - const struct mtd_partition **pparts,
51 - struct mtd_part_parser_data *data)
52 +static int parse_fixed_partitions(struct mtd_info *master,
53 + const struct mtd_partition **pparts,
54 + struct mtd_part_parser_data *data)
56 struct mtd_partition *parts;
57 struct device_node *mtd_node;
58 @@ -141,8 +141,8 @@ ofpart_none:
61 static struct mtd_part_parser ofpart_parser = {
62 - .parse_fn = parse_ofpart_partitions,
64 + .parse_fn = parse_fixed_partitions,
65 + .name = "fixed-partitions",
68 static int parse_ofoldpart_partitions(struct mtd_info *master,
69 @@ -229,4 +229,5 @@ MODULE_AUTHOR("Vitaly Wool, David Gibson
70 * with the same name. Since we provide the ofoldpart parser, we should have
71 * the corresponding alias.
73 +MODULE_ALIAS("fixed-partitions");
74 MODULE_ALIAS("ofoldpart");