[PATCH 044/104] mtd: fsl_elbc_nand: use ofpart through generic parsing
Dmitry Eremin-Solenikov
dbaryshkov at gmail.com
Thu Jun 2 10:51:22 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_elbc_nand.c | 9 ++-------
1 files changed, 2 insertions(+), 7 deletions(-)
diff --git a/drivers/mtd/nand/fsl_elbc_nand.c b/drivers/mtd/nand/fsl_elbc_nand.c
index 0bb254c..b818264 100644
--- a/drivers/mtd/nand/fsl_elbc_nand.c
+++ b/drivers/mtd/nand/fsl_elbc_nand.c
@@ -842,7 +842,7 @@ static int __devinit fsl_elbc_nand_probe(struct platform_device *pdev)
struct resource res;
struct fsl_elbc_fcm_ctrl *elbc_fcm_ctrl;
static const char *part_probe_types[]
- = { "cmdlinepart", "RedBoot", NULL };
+ = { "cmdlinepart", "RedBoot", "ofpart", NULL };
struct mtd_partition *parts;
int ret;
int bank;
@@ -910,6 +910,7 @@ static int __devinit fsl_elbc_nand_probe(struct platform_device *pdev)
goto err;
}
+ priv->mtd.node = pdev->dev.of_node;
priv->mtd.name = kasprintf(GFP_KERNEL, "%x.flash", (unsigned)res.start);
if (!priv->mtd.name) {
ret = -ENOMEM;
@@ -938,12 +939,6 @@ static int __devinit fsl_elbc_nand_probe(struct platform_device *pdev)
if (ret < 0)
goto err;
- if (ret == 0) {
- ret = of_mtd_parse_partitions(priv->dev, node, &parts);
- if (ret < 0)
- goto err;
- }
-
mtd_device_register(&priv->mtd, parts, ret);
printk(KERN_INFO "eLBC NAND device at 0x%llx, bank %d\n",
--
1.7.4.4
More information about the linux-mtd
mailing list