diff options
Diffstat (limited to 'drivers/mtd/nand/s3c2410.c')
-rw-r--r-- | drivers/mtd/nand/s3c2410.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/drivers/mtd/nand/s3c2410.c b/drivers/mtd/nand/s3c2410.c index 239aadfd01b0..33d832dddfdd 100644 --- a/drivers/mtd/nand/s3c2410.c +++ b/drivers/mtd/nand/s3c2410.c | |||
@@ -727,15 +727,12 @@ static int s3c2410_nand_add_partition(struct s3c2410_nand_info *info, | |||
727 | if (set == NULL) | 727 | if (set == NULL) |
728 | return add_mtd_device(&mtd->mtd); | 728 | return add_mtd_device(&mtd->mtd); |
729 | 729 | ||
730 | if (set->nr_partitions == 0) { | 730 | mtd->mtd.name = set->name; |
731 | mtd->mtd.name = set->name; | 731 | nr_part = parse_mtd_partitions(&mtd->mtd, part_probes, &part_info, 0); |
732 | nr_part = parse_mtd_partitions(&mtd->mtd, part_probes, | 732 | |
733 | &part_info, 0); | 733 | if (nr_part <= 0 && set->nr_partitions > 0) { |
734 | } else { | 734 | nr_part = set->nr_partitions; |
735 | if (set->nr_partitions > 0 && set->partitions != NULL) { | 735 | part_info = set->partitions; |
736 | nr_part = set->nr_partitions; | ||
737 | part_info = set->partitions; | ||
738 | } | ||
739 | } | 736 | } |
740 | 737 | ||
741 | if (nr_part > 0 && part_info) | 738 | if (nr_part > 0 && part_info) |