From patchwork Thu Jun 2 14:51:23 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [045/104] mtd: fsl_upm: use ofpart through generic parsing Date: Thu, 02 Jun 2011 04:51:23 -0000 From: Dmitry Eremin-Solenikov X-Patchwork-Id: 98403 Message-Id: <1307026293-8535-11-git-send-email-dbaryshkov@gmail.com> To: linux-mtd@lists.infradead.org Convert the driver to use ofpart partitions parsing through the generic parse_mtd_partitions(). Signed-off-by: Dmitry Eremin-Solenikov --- 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);