diff options
| author | Jamie Iles <jamie@jamieiles.com> | 2011-05-23 05:23:33 -0400 |
|---|---|---|
| committer | David Woodhouse <David.Woodhouse@intel.com> | 2011-05-24 21:23:52 -0400 |
| commit | af86ea8fa3df5516175ec948875f6e742e82c1ad (patch) | |
| tree | bc06f4b495590a88754ee24b156962e15b19625b | |
| parent | acd4134ac9706d9a7ea1c1babee9a313a8e9cac6 (diff) | |
mtd: s3c2410 nand: convert to mtd_device_register()
Convert to mtd_device_register() and remove the CONFIG_MTD_PARTITIONS
preprocessor conditionals as partitioning is always available.
Cc: Ben Dooks <ben-linux@fluff.org>
Cc: Kukjin Kim <kgene.kim@samsung.com>
Signed-off-by: Jamie Iles <jamie@jamieiles.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
| -rw-r--r-- | drivers/mtd/nand/s3c2410.c | 16 |
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 | ||
| 748 | const char *part_probes[] = { "cmdlinepart", NULL }; | 747 | const char *part_probes[] = { "cmdlinepart", NULL }; |
| 749 | static int s3c2410_nand_add_partition(struct s3c2410_nand_info *info, | 748 | static 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 | ||
| 773 | static 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 |
