Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 252557
b: refs/heads/master
c: af86ea8
h: refs/heads/master
i:
  252555: e977398
v: v3
  • Loading branch information
Jamie Iles authored and David Woodhouse committed May 25, 2011
1 parent 42c671f commit 50aa498
Show file tree
Hide file tree
Showing 2 changed files with 3 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: acd4134ac9706d9a7ea1c1babee9a313a8e9cac6
refs/heads/master: af86ea8fa3df5516175ec948875f6e742e82c1ad
16 changes: 2 additions & 14 deletions trunk/drivers/mtd/nand/s3c2410.c
Original file line number Diff line number Diff line change
Expand Up @@ -744,7 +744,6 @@ static int s3c24xx_nand_remove(struct platform_device *pdev)
return 0;
}

#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,
Expand All @@ -754,7 +753,7 @@ static int s3c2410_nand_add_partition(struct s3c2410_nand_info *info,
int nr_part = 0;

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

mtd->mtd.name = set->name;
nr_part = parse_mtd_partitions(&mtd->mtd, part_probes, &part_info, 0);
Expand All @@ -764,19 +763,8 @@ static int s3c2410_nand_add_partition(struct s3c2410_nand_info *info,
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
static int s3c2410_nand_add_partition(struct s3c2410_nand_info *info,
struct s3c2410_nand_mtd *mtd,
struct s3c2410_nand_set *set)
{
return add_mtd_device(&mtd->mtd);
return mtd_device_register(&mtd->mtd, part_info, nr_part);
}
#endif

/**
* s3c2410_nand_init_chip - initialise a single instance of an chip
Expand Down

0 comments on commit 50aa498

Please sign in to comment.