mtd: plat_nand: use default partition probe

Linux-MTD Mailing List linux-mtd at lists.infradead.org
Tue Jun 23 10:59:06 PDT 2015


Gitweb:     http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=8bf57b0dd431e521d7b3f34e0681fbb2536e86b8
Commit:     8bf57b0dd431e521d7b3f34e0681fbb2536e86b8
Parent:     db5b09f6ed9d7617e43d7140e8bd8649ec067862
Author:     Brian Norris <computersforpeace at gmail.com>
AuthorDate: Mon May 18 16:15:24 2015 -0700
Committer:  Brian Norris <computersforpeace at gmail.com>
CommitDate: Wed May 27 12:34:35 2015 -0700

    mtd: plat_nand: use default partition probe
    
    It's harmless to add 'ofpart' (the only different parser supported in
    default mtdpart.c) to plat_nand. That let's us kill off one more custom
    partition prober listing.
    
    Signed-off-by: Brian Norris <computersforpeace at gmail.com>
---
 drivers/mtd/nand/plat_nand.c | 4 +---
 drivers/mtd/nand/xway_nand.c | 4 ----
 2 files changed, 1 insertion(+), 7 deletions(-)

diff --git a/drivers/mtd/nand/plat_nand.c b/drivers/mtd/nand/plat_nand.c
index 4535c26..717cf62 100644
--- a/drivers/mtd/nand/plat_nand.c
+++ b/drivers/mtd/nand/plat_nand.c
@@ -24,8 +24,6 @@ struct plat_nand_data {
 	void __iomem		*io_base;
 };
 
-static const char *part_probe_types[] = { "cmdlinepart", NULL };
-
 /*
  * Probe for the NAND device.
  */
@@ -95,7 +93,7 @@ static int plat_nand_probe(struct platform_device *pdev)
 		goto out;
 	}
 
-	part_types = pdata->chip.part_probe_types ? : part_probe_types;
+	part_types = pdata->chip.part_probe_types;
 
 	ppdata.of_node = pdev->dev.of_node;
 	err = mtd_device_parse_register(&data->mtd, part_types, &ppdata,
diff --git a/drivers/mtd/nand/xway_nand.c b/drivers/mtd/nand/xway_nand.c
index 3f81dc8..3b28db4 100644
--- a/drivers/mtd/nand/xway_nand.c
+++ b/drivers/mtd/nand/xway_nand.c
@@ -160,14 +160,10 @@ static int xway_nand_probe(struct platform_device *pdev)
 	return 0;
 }
 
-/* allow users to override the partition in DT using the cmdline */
-static const char *part_probes[] = { "cmdlinepart", "ofpart", NULL };
-
 static struct platform_nand_data xway_nand_data = {
 	.chip = {
 		.nr_chips		= 1,
 		.chip_delay		= 30,
-		.part_probe_types	= part_probes,
 	},
 	.ctrl = {
 		.probe		= xway_nand_probe,



More information about the linux-mtd-cvs mailing list