From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= Subject: [PATCH V9 2/4] mtd: rename "ofpart" parser to "fixed-partitions" as it fits it better Date: Tue, 30 Jan 2018 21:10:57 +0100 Message-ID: <20180130201059.4424-3-zajec5@gmail.com> References: <20180130201059.4424-1-zajec5@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Return-path: In-Reply-To: <20180130201059.4424-1-zajec5-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> Sender: devicetree-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Brian Norris , David Woodhouse , Boris Brezillon , Marek Vasut , Richard Weinberger , Cyrille Pitchen , Rob Herring Cc: Mark Rutland , Frank Rowand , Linus Walleij , linux-mtd-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org, devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Geert Uytterhoeven , Jonas Gorski , Florian Fainelli , John Crispin , Peter Rosin , =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= List-Id: devicetree@vger.kernel.org From: Rafał Miłecki 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 --- V9: First appearance of this commit --- drivers/mtd/mtdpart.c | 4 ++-- drivers/mtd/ofpart.c | 11 ++++++----- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/drivers/mtd/mtdpart.c b/drivers/mtd/mtdpart.c index d40ec525ceff..a29bbcf79691 100644 --- a/drivers/mtd/mtdpart.c +++ b/drivers/mtd/mtdpart.c @@ -864,7 +864,7 @@ static int mtd_part_of_parse(struct mtd_info *master, struct mtd_partitions *pparts) { struct mtd_part_parser *parser; - const char *fixed = "ofpart"; + const char *fixed = "fixed-partitions"; int ret, err = 0; /* @@ -872,7 +872,7 @@ static int mtd_part_of_parse(struct mtd_info *master, */ /* - * 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. diff --git a/drivers/mtd/ofpart.c b/drivers/mtd/ofpart.c index 6bdf4e525677..9f497315e65d 100644 --- a/drivers/mtd/ofpart.c +++ b/drivers/mtd/ofpart.c @@ -25,9 +25,9 @@ static bool node_has_compatible(struct device_node *pp) 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 @@ static int parse_ofpart_partitions(struct mtd_info *master, } 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"); -- 2.11.0 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-lf0-x243.google.com ([2a00:1450:4010:c07::243]) by bombadil.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1egcFq-0001N3-Jn for linux-mtd@lists.infradead.org; Tue, 30 Jan 2018 20:11:48 +0000 Received: by mail-lf0-x243.google.com with SMTP id o89so17215308lfg.10 for ; Tue, 30 Jan 2018 12:11:31 -0800 (PST) From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= To: Brian Norris , David Woodhouse , Boris Brezillon , Marek Vasut , Richard Weinberger , Cyrille Pitchen , Rob Herring Cc: Mark Rutland , Frank Rowand , Linus Walleij , linux-mtd@lists.infradead.org, devicetree@vger.kernel.org, Geert Uytterhoeven , Jonas Gorski , Florian Fainelli , John Crispin , Peter Rosin , =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= Subject: [PATCH V9 2/4] mtd: rename "ofpart" parser to "fixed-partitions" as it fits it better Date: Tue, 30 Jan 2018 21:10:57 +0100 Message-Id: <20180130201059.4424-3-zajec5@gmail.com> In-Reply-To: <20180130201059.4424-1-zajec5@gmail.com> References: <20180130201059.4424-1-zajec5@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Rafał Miłecki 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 --- V9: First appearance of this commit --- drivers/mtd/mtdpart.c | 4 ++-- drivers/mtd/ofpart.c | 11 ++++++----- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/drivers/mtd/mtdpart.c b/drivers/mtd/mtdpart.c index d40ec525ceff..a29bbcf79691 100644 --- a/drivers/mtd/mtdpart.c +++ b/drivers/mtd/mtdpart.c @@ -864,7 +864,7 @@ static int mtd_part_of_parse(struct mtd_info *master, struct mtd_partitions *pparts) { struct mtd_part_parser *parser; - const char *fixed = "ofpart"; + const char *fixed = "fixed-partitions"; int ret, err = 0; /* @@ -872,7 +872,7 @@ static int mtd_part_of_parse(struct mtd_info *master, */ /* - * 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. diff --git a/drivers/mtd/ofpart.c b/drivers/mtd/ofpart.c index 6bdf4e525677..9f497315e65d 100644 --- a/drivers/mtd/ofpart.c +++ b/drivers/mtd/ofpart.c @@ -25,9 +25,9 @@ static bool node_has_compatible(struct device_node *pp) 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 @@ static int parse_ofpart_partitions(struct mtd_info *master, } 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"); -- 2.11.0