c3806556353fba7f8ae2b7a5bf042547f17eede3
[openwrt/staging/jogo.git] /
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
4 it fits it better
5 MIME-Version: 1.0
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
8
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.
13
14 Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
15 ---
16
17 --- a/drivers/mtd/mtdpart.c
18 +++ b/drivers/mtd/mtdpart.c
19 @@ -940,7 +940,7 @@ static int mtd_part_of_parse(struct mtd_
20 struct device_node *np;
21 struct property *prop;
22 const char *compat;
23 - const char *fixed = "ofpart";
24 + const char *fixed = "fixed-partitions";
25 int ret, err = 0;
26
27 np = of_get_child_by_name(mtd_get_of_node(master), "partitions");
28 @@ -960,7 +960,7 @@ static int mtd_part_of_parse(struct mtd_
29 of_node_put(np);
30
31 /*
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);
41 }
42
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)
49 {
50 struct mtd_partition *parts;
51 struct device_node *mtd_node;
52 @@ -141,8 +141,8 @@ ofpart_none:
53 }
54
55 static struct mtd_part_parser ofpart_parser = {
56 - .parse_fn = parse_ofpart_partitions,
57 - .name = "ofpart",
58 + .parse_fn = parse_fixed_partitions,
59 + .name = "fixed-partitions",
60 };
61
62 static int parse_ofoldpart_partitions(struct mtd_info *master,
63 @@ -229,4 +229,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.
66 */
67 +MODULE_ALIAS("fixed-partitions");
68 MODULE_ALIAS("ofoldpart");