Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 252558
b: refs/heads/master
c: 6baed70
h: refs/heads/master
v: v3
  • Loading branch information
Jamie Iles authored and David Woodhouse committed May 25, 2011
1 parent 50aa498 commit 31c67da
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 11 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: af86ea8fa3df5516175ec948875f6e742e82c1ad
refs/heads/master: 6baed700f21c9b200e344518932a7046b05853a4
12 changes: 2 additions & 10 deletions trunk/drivers/mtd/nand/sharpsl.c
Original file line number Diff line number Diff line change
Expand Up @@ -103,20 +103,16 @@ static int sharpsl_nand_calculate_ecc(struct mtd_info *mtd, const u_char * dat,
return readb(sharpsl->io + ECCCNTR) != 0;
}

#ifdef CONFIG_MTD_PARTITIONS
static const char *part_probes[] = { "cmdlinepart", NULL };
#endif

/*
* Main initialization routine
*/
static int __devinit sharpsl_nand_probe(struct platform_device *pdev)
{
struct nand_chip *this;
#ifdef CONFIG_MTD_PARTITIONS
struct mtd_partition *sharpsl_partition_info;
int nr_partitions;
#endif
struct resource *r;
int err = 0;
struct sharpsl_nand *sharpsl;
Expand Down Expand Up @@ -188,18 +184,14 @@ static int __devinit sharpsl_nand_probe(struct platform_device *pdev)

/* Register the partitions */
sharpsl->mtd.name = "sharpsl-nand";
#ifdef CONFIG_MTD_PARTITIONS
nr_partitions = parse_mtd_partitions(&sharpsl->mtd, part_probes, &sharpsl_partition_info, 0);
if (nr_partitions <= 0) {
nr_partitions = data->nr_partitions;
sharpsl_partition_info = data->partitions;
}

if (nr_partitions > 0)
err = add_mtd_partitions(&sharpsl->mtd, sharpsl_partition_info, nr_partitions);
else
#endif
err = add_mtd_device(&sharpsl->mtd);
err = mtd_device_register(&sharpsl->mtd, sharpsl_partition_info,
nr_partitions);
if (err)
goto err_add;

Expand Down

0 comments on commit 31c67da

Please sign in to comment.