Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 252561
b: refs/heads/master
c: c52840f
h: refs/heads/master
i:
  252559: 8793b95
v: v3
  • Loading branch information
Jamie Iles authored and David Woodhouse committed May 25, 2011
1 parent a316b55 commit cdf8d3b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 14 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: d1e084e6637fa23de92e4ffb04c99b10daefa6e9
refs/heads/master: c52840f878d373677fa98223e2204d17a30fbfd5
14 changes: 1 addition & 13 deletions trunk/drivers/mtd/nand/txx9ndfmc.c
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,7 @@ struct txx9ndfmc_drvdata {
unsigned char hold; /* in gbusclock */
unsigned char spw; /* in gbusclock */
struct nand_hw_control hw_control;
#ifdef CONFIG_MTD_PARTITIONS
struct mtd_partition *parts[MAX_TXX9NDFMC_DEV];
#endif
};

static struct platform_device *mtd_to_platdev(struct mtd_info *mtd)
Expand Down Expand Up @@ -289,9 +287,7 @@ static int txx9ndfmc_nand_scan(struct mtd_info *mtd)
static int __init txx9ndfmc_probe(struct platform_device *dev)
{
struct txx9ndfmc_platform_data *plat = dev->dev.platform_data;
#ifdef CONFIG_MTD_PARTITIONS
static const char *probes[] = { "cmdlinepart", NULL };
#endif
int hold, spw;
int i;
struct txx9ndfmc_drvdata *drvdata;
Expand Down Expand Up @@ -337,9 +333,7 @@ static int __init txx9ndfmc_probe(struct platform_device *dev)
struct txx9ndfmc_priv *txx9_priv;
struct nand_chip *chip;
struct mtd_info *mtd;
#ifdef CONFIG_MTD_PARTITIONS
int nr_parts;
#endif

if (!(plat->ch_mask & (1 << i)))
continue;
Expand Down Expand Up @@ -399,13 +393,9 @@ static int __init txx9ndfmc_probe(struct platform_device *dev)
}
mtd->name = txx9_priv->mtdname;

#ifdef CONFIG_MTD_PARTITIONS
nr_parts = parse_mtd_partitions(mtd, probes,
&drvdata->parts[i], 0);
if (nr_parts > 0)
add_mtd_partitions(mtd, drvdata->parts[i], nr_parts);
#endif
add_mtd_device(mtd);
mtd_device_register(mtd, drvdata->parts[i], nr_parts);
drvdata->mtds[i] = mtd;
}

Expand All @@ -431,9 +421,7 @@ static int __exit txx9ndfmc_remove(struct platform_device *dev)
txx9_priv = chip->priv;

nand_release(mtd);
#ifdef CONFIG_MTD_PARTITIONS
kfree(drvdata->parts[i]);
#endif
kfree(txx9_priv->mtdname);
kfree(txx9_priv);
}
Expand Down

0 comments on commit cdf8d3b

Please sign in to comment.