Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 274854
b: refs/heads/master
c: 599501a
h: refs/heads/master
v: v3
  • Loading branch information
Dmitry Eremin-Solenikov authored and Artem Bityutskiy committed Sep 11, 2011
1 parent 9880823 commit e1c74cb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 15 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: ee0f6a15b3f9246ae11e581cb9dae8fb2cc5da5c
refs/heads/master: 599501a749a1ca3baa94ac9714f06782f63439b0
18 changes: 4 additions & 14 deletions trunk/drivers/mtd/nand/s3c2410.c
Original file line number Diff line number Diff line change
Expand Up @@ -748,21 +748,11 @@ 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)
mtd->mtd.name = set->name;

if (set == NULL)
return mtd_device_register(&mtd->mtd, NULL, 0);

mtd->mtd.name = set->name;
nr_part = parse_mtd_partitions(&mtd->mtd, NULL, &part_info, 0);

if (nr_part <= 0 && set->nr_partitions > 0) {
nr_part = set->nr_partitions;
part_info = set->partitions;
}

return mtd_device_register(&mtd->mtd, part_info, nr_part);
return mtd_device_parse_register(&mtd->mtd, NULL, 0,
set->partitions, set->nr_partitions);
}

/**
Expand Down

0 comments on commit e1c74cb

Please sign in to comment.