summaryrefslogtreecommitdiffstats
path: root/drivers/mtd/nand/s3c2410.c
diff options
context:
space:
mode:
authorConke Hu <conke@maxwit.com>2010-07-13 12:56:30 +0800
committerDavid Woodhouse <David.Woodhouse@intel.com>2010-08-02 09:08:13 +0100
commit78d1022439e501bc4a1a32bfaad5a321b8a9d5d6 (patch)
treebc10b95bff7993ae36d45a416df8404e2a3b84fa /drivers/mtd/nand/s3c2410.c
parent6a8cfcfb0de881735df4031eb5cc99be3d0971e9 (diff)
downloadblackbird-op-linux-78d1022439e501bc4a1a32bfaad5a321b8a9d5d6.tar.gz
blackbird-op-linux-78d1022439e501bc4a1a32bfaad5a321b8a9d5d6.zip
mtd: s3c nand: parsing command-line partitions prior to set->partitions
Current driver prevents command-line partitions from being parsed when built-in partitions are defined in s3c2410_nand_set object, but it is not desirable in some cases. This patch tries to parse commad-line partitions prior to the built-in. Signed-off-by: Conke Hu <conke@maxwit.com> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Diffstat (limited to 'drivers/mtd/nand/s3c2410.c')
-rw-r--r--drivers/mtd/nand/s3c2410.c15
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,
if (set == NULL)
return add_mtd_device(&mtd->mtd);
- if (set->nr_partitions == 0) {
- mtd->mtd.name = set->name;
- nr_part = parse_mtd_partitions(&mtd->mtd, part_probes,
- &part_info, 0);
- } else {
- if (set->nr_partitions > 0 && set->partitions != NULL) {
- nr_part = set->nr_partitions;
- part_info = set->partitions;
- }
+ mtd->mtd.name = set->name;
+ nr_part = parse_mtd_partitions(&mtd->mtd, part_probes, &part_info, 0);
+
+ if (nr_part <= 0 && set->nr_partitions > 0) {
+ nr_part = set->nr_partitions;
+ part_info = set->partitions;
}
if (nr_part > 0 && part_info)
OpenPOWER on IntegriCloud