1 From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl>
2 Date: Tue, 30 Jan 2018 12:09:58 +0100
3 Subject: [PATCH V10 2/3] mtd: rename "ofpart" parser to "fixed-partitions" as
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
9 Type "ofpart" means that OF should be used to get partitioning info and
10 this driver supports "fixed-partitions" binding only. Renaming it should
11 lead to less confusion especially when parsers for new compatibility
12 strings start to appear.
14 Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
17 --- a/drivers/mtd/mtdpart.c
18 +++ b/drivers/mtd/mtdpart.c
19 @@ -932,7 +932,7 @@ static int mtd_part_of_parse(struct mtd_
20 struct device_node *np;
21 struct property *prop;
23 - const char *fixed = "ofpart";
24 + const char *fixed = "fixed-partitions";
27 np = of_get_child_by_name(mtd_get_of_node(master), "partitions");
28 @@ -952,7 +952,7 @@ static int mtd_part_of_parse(struct mtd_
32 - * For backward compatibility we have to try the "ofpart"
33 + * For backward compatibility we have to try the "fixed-partitions"
34 * parser. It supports old DT format with partitions specified as a
35 * direct subnodes of a flash device DT node without any compatibility
36 * specified we could match.
37 --- a/drivers/mtd/ofpart.c
38 +++ b/drivers/mtd/ofpart.c
39 @@ -25,9 +25,9 @@ static bool node_has_compatible(struct d
40 return of_get_property(pp, "compatible", NULL);
43 -static int parse_ofpart_partitions(struct mtd_info *master,
44 - const struct mtd_partition **pparts,
45 - struct mtd_part_parser_data *data)
46 +static int parse_fixed_partitions(struct mtd_info *master,
47 + const struct mtd_partition **pparts,
48 + struct mtd_part_parser_data *data)
50 struct mtd_partition *parts;
51 struct device_node *mtd_node;
52 @@ -141,8 +141,8 @@ ofpart_none:
55 static struct mtd_part_parser ofpart_parser = {
56 - .parse_fn = parse_ofpart_partitions,
58 + .parse_fn = parse_fixed_partitions,
59 + .name = "fixed-partitions",
62 static int parse_ofoldpart_partitions(struct mtd_info *master,
63 @@ -230,4 +230,5 @@ MODULE_AUTHOR("Vitaly Wool, David Gibson
64 * with the same name. Since we provide the ofoldpart parser, we should have
65 * the corresponding alias.
67 +MODULE_ALIAS("fixed-partitions");
68 MODULE_ALIAS("ofoldpart");