aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/nand/tmio_nand.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mtd/nand/tmio_nand.c')
-rw-r--r--drivers/mtd/nand/tmio_nand.c17
1 files changed, 3 insertions, 14 deletions
diff --git a/drivers/mtd/nand/tmio_nand.c b/drivers/mtd/nand/tmio_nand.c
index 11e8371b568..beebd95f769 100644
--- a/drivers/mtd/nand/tmio_nand.c
+++ b/drivers/mtd/nand/tmio_nand.c
@@ -121,9 +121,6 @@ struct tmio_nand {
121 121
122#define mtd_to_tmio(m) container_of(m, struct tmio_nand, mtd) 122#define mtd_to_tmio(m) container_of(m, struct tmio_nand, mtd)
123 123
124#ifdef CONFIG_MTD_CMDLINE_PARTS
125static const char *part_probes[] = { "cmdlinepart", NULL };
126#endif
127 124
128/*--------------------------------------------------------------------------*/ 125/*--------------------------------------------------------------------------*/
129 126
@@ -381,8 +378,6 @@ static int tmio_probe(struct platform_device *dev)
381 struct tmio_nand *tmio; 378 struct tmio_nand *tmio;
382 struct mtd_info *mtd; 379 struct mtd_info *mtd;
383 struct nand_chip *nand_chip; 380 struct nand_chip *nand_chip;
384 struct mtd_partition *parts;
385 int nbparts = 0;
386 int retval; 381 int retval;
387 382
388 if (data == NULL) 383 if (data == NULL)
@@ -461,15 +456,9 @@ static int tmio_probe(struct platform_device *dev)
461 goto err_scan; 456 goto err_scan;
462 } 457 }
463 /* Register the partitions */ 458 /* Register the partitions */
464#ifdef CONFIG_MTD_CMDLINE_PARTS 459 retval = mtd_device_parse_register(mtd, NULL, 0,
465 nbparts = parse_mtd_partitions(mtd, part_probes, &parts, 0); 460 data ? data->partition : NULL,
466#endif 461 data ? data->num_partitions : 0);
467 if (nbparts <= 0 && data) {
468 parts = data->partition;
469 nbparts = data->num_partitions;
470 }
471
472 retval = mtd_device_register(mtd, parts, nbparts);
473 if (!retval) 462 if (!retval)
474 return retval; 463 return retval;
475 464