提交 c0faf434 编写于 作者: R Rafał Miłecki 提交者: Boris Brezillon

mtd: rename "ofpart" parser to "fixed-partitions" as it fits it better

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: NRafał Miłecki <rafal@milecki.pl>
Reviewed-by: NRichard Weinberger <richard@nod.at>
Signed-off-by: NBoris Brezillon <boris.brezillon@bootlin.com>
上级 5b644aa0
...@@ -892,7 +892,7 @@ static int mtd_part_of_parse(struct mtd_info *master, ...@@ -892,7 +892,7 @@ static int mtd_part_of_parse(struct mtd_info *master,
struct device_node *np; struct device_node *np;
struct property *prop; struct property *prop;
const char *compat; const char *compat;
const char *fixed = "ofpart"; const char *fixed = "fixed-partitions";
int ret, err = 0; int ret, err = 0;
np = of_get_child_by_name(mtd_get_of_node(master), "partitions"); np = of_get_child_by_name(mtd_get_of_node(master), "partitions");
...@@ -912,7 +912,7 @@ static int mtd_part_of_parse(struct mtd_info *master, ...@@ -912,7 +912,7 @@ static int mtd_part_of_parse(struct mtd_info *master,
of_node_put(np); 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 * parser. It supports old DT format with partitions specified as a
* direct subnodes of a flash device DT node without any compatibility * direct subnodes of a flash device DT node without any compatibility
* specified we could match. * specified we could match.
......
...@@ -25,7 +25,7 @@ static bool node_has_compatible(struct device_node *pp) ...@@ -25,7 +25,7 @@ static bool node_has_compatible(struct device_node *pp)
return of_get_property(pp, "compatible", NULL); return of_get_property(pp, "compatible", NULL);
} }
static int parse_ofpart_partitions(struct mtd_info *master, static int parse_fixed_partitions(struct mtd_info *master,
const struct mtd_partition **pparts, const struct mtd_partition **pparts,
struct mtd_part_parser_data *data) struct mtd_part_parser_data *data)
{ {
...@@ -141,8 +141,8 @@ static int parse_ofpart_partitions(struct mtd_info *master, ...@@ -141,8 +141,8 @@ static int parse_ofpart_partitions(struct mtd_info *master,
} }
static struct mtd_part_parser ofpart_parser = { static struct mtd_part_parser ofpart_parser = {
.parse_fn = parse_ofpart_partitions, .parse_fn = parse_fixed_partitions,
.name = "ofpart", .name = "fixed-partitions",
}; };
static int parse_ofoldpart_partitions(struct mtd_info *master, static int parse_ofoldpart_partitions(struct mtd_info *master,
...@@ -229,4 +229,5 @@ MODULE_AUTHOR("Vitaly Wool, David Gibson"); ...@@ -229,4 +229,5 @@ MODULE_AUTHOR("Vitaly Wool, David Gibson");
* with the same name. Since we provide the ofoldpart parser, we should have * with the same name. Since we provide the ofoldpart parser, we should have
* the corresponding alias. * the corresponding alias.
*/ */
MODULE_ALIAS("fixed-partitions");
MODULE_ALIAS("ofoldpart"); MODULE_ALIAS("ofoldpart");
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册