aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/mtd/nand/s3c2410.c16
1 files changed, 2 insertions, 14 deletions
diff --git a/drivers/mtd/nand/s3c2410.c b/drivers/mtd/nand/s3c2410.c
index cea775aa9482..4405468f196b 100644
--- a/drivers/mtd/nand/s3c2410.c
+++ b/drivers/mtd/nand/s3c2410.c
@@ -744,7 +744,6 @@ static int s3c24xx_nand_remove(struct platform_device *pdev)
744 return 0; 744 return 0;
745} 745}
746 746
747#ifdef CONFIG_MTD_PARTITIONS
748const char *part_probes[] = { "cmdlinepart", NULL }; 747const char *part_probes[] = { "cmdlinepart", NULL };
749static int s3c2410_nand_add_partition(struct s3c2410_nand_info *info, 748static int s3c2410_nand_add_partition(struct s3c2410_nand_info *info,
750 struct s3c2410_nand_mtd *mtd, 749 struct s3c2410_nand_mtd *mtd,
@@ -754,7 +753,7 @@ static int s3c2410_nand_add_partition(struct s3c2410_nand_info *info,
754 int nr_part = 0; 753 int nr_part = 0;
755 754
756 if (set == NULL) 755 if (set == NULL)
757 return add_mtd_device(&mtd->mtd); 756 return mtd_device_register(&mtd->mtd, NULL, 0);
758 757
759 mtd->mtd.name = set->name; 758 mtd->mtd.name = set->name;
760 nr_part = parse_mtd_partitions(&mtd->mtd, part_probes, &part_info, 0); 759 nr_part = parse_mtd_partitions(&mtd->mtd, part_probes, &part_info, 0);
@@ -764,19 +763,8 @@ static int s3c2410_nand_add_partition(struct s3c2410_nand_info *info,
764 part_info = set->partitions; 763 part_info = set->partitions;
765 } 764 }
766 765
767 if (nr_part > 0 && part_info) 766 return mtd_device_register(&mtd->mtd, part_info, nr_part);
768 return add_mtd_partitions(&mtd->mtd, part_info, nr_part);
769
770 return add_mtd_device(&mtd->mtd);
771}
772#else
773static int s3c2410_nand_add_partition(struct s3c2410_nand_info *info,
774 struct s3c2410_nand_mtd *mtd,
775 struct s3c2410_nand_set *set)
776{
777 return add_mtd_device(&mtd->mtd);
778} 767}
779#endif
780 768
781/** 769/**
782 * s3c2410_nand_init_chip - initialise a single instance of an chip 770 * s3c2410_nand_init_chip - initialise a single instance of an chip