Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 153818
b: refs/heads/master
c: ed27f02
h: refs/heads/master
v: v3
  • Loading branch information
Andy Green authored and Ben Dooks committed May 30, 2009
1 parent e4ecba2 commit 6ca5e59
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ae7304e554642d57993b32265b817e6ae80787de
refs/heads/master: ed27f0287062236d50190d7447f6377ff4acdfad
18 changes: 16 additions & 2 deletions trunk/drivers/mtd/nand/s3c2410.c
Original file line number Diff line number Diff line change
Expand Up @@ -699,17 +699,31 @@ static int s3c24xx_nand_remove(struct platform_device *pdev)
}

#ifdef CONFIG_MTD_PARTITIONS
const char *part_probes[] = { "cmdlinepart", NULL };
static int s3c2410_nand_add_partition(struct s3c2410_nand_info *info,
struct s3c2410_nand_mtd *mtd,
struct s3c2410_nand_set *set)
{
struct mtd_partition *part_info;
int nr_part = 0;

if (set == NULL)
return add_mtd_device(&mtd->mtd);

if (set->nr_partitions > 0 && set->partitions != NULL) {
return add_mtd_partitions(&mtd->mtd, set->partitions, set->nr_partitions);
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;
}
}

if (nr_part > 0 && part_info)
return add_mtd_partitions(&mtd->mtd, part_info, nr_part);

return add_mtd_device(&mtd->mtd);
}
#else
Expand Down

0 comments on commit 6ca5e59

Please sign in to comment.