[PATCH 14/17] mtd: fsl_upm.c: use mtd_device_parse_register
Dmitry Eremin-Solenikov
dbaryshkov at gmail.com
Thu Jun 9 10:23:05 EDT 2011
Replace custom invocations of parse_mtd_partitions and mtd_device_register
with common mtd_device_parse_register call. This would bring: standard
handling of all errors, fallback to default partitions, etc.
Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov at gmail.com>
---
drivers/mtd/nand/fsl_upm.c | 4 +---
1 files changed, 1 insertions(+), 3 deletions(-)
diff --git a/drivers/mtd/nand/fsl_upm.c b/drivers/mtd/nand/fsl_upm.c
index 253b8ff..04be80a 100644
--- a/drivers/mtd/nand/fsl_upm.c
+++ b/drivers/mtd/nand/fsl_upm.c
@@ -192,9 +192,7 @@ static int __devinit fun_chip_init(struct fsl_upm_nand *fun,
if (ret)
goto err;
- ret = parse_mtd_partitions(&fun->mtd, NULL, &fun->parts, 0);
-
- ret = mtd_device_register(&fun->mtd, fun->parts, ret);
+ ret = mtd_device_parse_register(&fun->mtd, NULL, 0, NULL, 0);
err:
of_node_put(flash_np);
return ret;
--
1.7.5.3
More information about the linux-mtd
mailing list