Patchwork [05/17] mtd: fsl_upm: use ofpart through generic parsing

login
register
mail settings
Submitter Dmitry Eremin-Solenikov
Date June 9, 2011, 2:22 p.m.
Message ID <1307629388-24769-6-git-send-email-dbaryshkov@gmail.com>
Download mbox | patch
Permalink /patch/99755/
State New
Headers show

Comments

Dmitry Eremin-Solenikov - June 9, 2011, 2:22 p.m.
Convert the driver to use ofpart partitions parsing through the generic
parse_mtd_partitions().

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
---
 drivers/mtd/nand/fsl_upm.c |    8 +-------
 1 files changed, 1 insertions(+), 7 deletions(-)

Patch

diff --git a/drivers/mtd/nand/fsl_upm.c b/drivers/mtd/nand/fsl_upm.c
index 7c782eb..253b8ff 100644
--- a/drivers/mtd/nand/fsl_upm.c
+++ b/drivers/mtd/nand/fsl_upm.c
@@ -175,6 +175,7 @@  static int __devinit fun_chip_init(struct fsl_upm_nand *fun,
 
 	fun->mtd.priv = &fun->chip;
 	fun->mtd.owner = THIS_MODULE;
+	fun->mtd.node = flash_np;
 
 	flash_np = of_get_next_child(upm_np, NULL);
 	if (!flash_np)
@@ -193,13 +194,6 @@  static int __devinit fun_chip_init(struct fsl_upm_nand *fun,
 
 	ret = parse_mtd_partitions(&fun->mtd, NULL, &fun->parts, 0);
 
-#ifdef CONFIG_MTD_OF_PARTS
-	if (ret == 0) {
-		ret = of_mtd_parse_partitions(fun->dev, flash_np, &fun->parts);
-		if (ret < 0)
-			goto err;
-	}
-#endif
 	ret = mtd_device_register(&fun->mtd, fun->parts, ret);
 err:
 	of_node_put(flash_np);