[PATCH 05/17] mtd: fsl_upm: use ofpart through generic parsing
Dmitry Eremin-Solenikov
dbaryshkov at gmail.com
Thu Jun 9 10:22:54 EDT 2011
Convert the driver to use ofpart partitions parsing through the generic
parse_mtd_partitions().
Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov at gmail.com>
---
drivers/mtd/nand/fsl_upm.c | 8 +-------
1 files changed, 1 insertions(+), 7 deletions(-)
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);
--
1.7.5.3
More information about the linux-mtd
mailing list