diff options
author | Justin Waters <justin.waters@timesys.com> | 2012-09-19 14:11:53 -0400 |
---|---|---|
committer | Ed Nash <ed.nash@timesys.com> | 2012-12-12 14:50:44 -0500 |
commit | c3a8aceebb13cbc4d50bd8a3a781f4ec9ef14951 (patch) | |
tree | 93da75e0b4fc155296c2e65af07906a9c094e1ba | |
parent | 3498f76a6b94cc54d9b116d419de64245be6ab2b (diff) |
fsl_nfc: Add default partitioning
Allows the NAND to properly probe if cmdline partitioning
is not specified. Otherwise, it will fail silently.
-rw-r--r-- | drivers/mtd/nand/fsl_nfc.c | 19 |
1 files changed, 5 insertions, 14 deletions
diff --git a/drivers/mtd/nand/fsl_nfc.c b/drivers/mtd/nand/fsl_nfc.c index 58f590d6f64e..f84c785e4383 100644 --- a/drivers/mtd/nand/fsl_nfc.c +++ b/drivers/mtd/nand/fsl_nfc.c @@ -934,20 +934,11 @@ fsl_nfc_probe(struct platform_device *pdev) /* Register device in MTD */ retval = parse_mtd_partitions(mtd, fsl_nfc_pprobes, &parts, 0); - if (retval < 0) { - printk(KERN_ERR DRV_NAME ": Error parsing MTD partitions!\n"); - free_irq(prv->irq, mtd); - retval = -EINVAL; - goto error; - } - - printk(KERN_DEBUG "parse partition: partnr = %d\n", retval); - - retval = mtd_device_register(mtd, parts, retval); - if (retval) { - printk(KERN_ERR DRV_NAME ": Error adding MTD device!\n"); - free_irq(prv->irq, mtd); - goto error; + if (retval > 0) + mtd_device_register(mtd, parts, retval); + else { + pr_info("Registering %s as whole device\n", mtd->name); + mtd_device_register(mtd, NULL, 0); } return 0; |