diff options
author | Arnd Bergmann <arnd@arndb.de> | 2011-11-23 20:47:41 +0000 |
---|---|---|
committer | Arnd Bergmann <arnd@arndb.de> | 2011-11-23 20:47:41 +0000 |
commit | 58a273745fbb2fbd01d26e7a60f0acc8c1d99469 (patch) | |
tree | bc16200f3b6ea150b298422754e32959eaa339bc /drivers/mtd/nand/plat_nand.c | |
parent | 951c486f62490e032da0ad17e93270b0cfb6687f (diff) | |
parent | 0116da4fcc1ae8a80d9002441e98768f2a6fa2fe (diff) | |
download | blackbird-op-linux-58a273745fbb2fbd01d26e7a60f0acc8c1d99469.tar.gz blackbird-op-linux-58a273745fbb2fbd01d26e7a60f0acc8c1d99469.zip |
Merge branches 'drivers/macb-gem' and 'drivers/pxa-gpio' into next/drivers
Diffstat (limited to 'drivers/mtd/nand/plat_nand.c')
-rw-r--r-- | drivers/mtd/nand/plat_nand.c | 25 |
1 files changed, 4 insertions, 21 deletions
diff --git a/drivers/mtd/nand/plat_nand.c b/drivers/mtd/nand/plat_nand.c index 633c04bf76f6..ea8e1234e0e2 100644 --- a/drivers/mtd/nand/plat_nand.c +++ b/drivers/mtd/nand/plat_nand.c @@ -21,8 +21,6 @@ struct plat_nand_data { struct nand_chip chip; struct mtd_info mtd; void __iomem *io_base; - int nr_parts; - struct mtd_partition *parts; }; /* @@ -79,6 +77,7 @@ static int __devinit plat_nand_probe(struct platform_device *pdev) data->chip.read_buf = pdata->ctrl.read_buf; data->chip.chip_delay = pdata->chip.chip_delay; data->chip.options |= pdata->chip.options; + data->chip.bbt_options |= pdata->chip.bbt_options; data->chip.ecc.hwctl = pdata->ctrl.hwcontrol; data->chip.ecc.layout = pdata->chip.ecclayout; @@ -99,23 +98,9 @@ static int __devinit plat_nand_probe(struct platform_device *pdev) goto out; } - if (pdata->chip.part_probe_types) { - err = parse_mtd_partitions(&data->mtd, - pdata->chip.part_probe_types, - &data->parts, 0); - if (err > 0) { - mtd_device_register(&data->mtd, data->parts, err); - return 0; - } - } - if (pdata->chip.set_parts) - pdata->chip.set_parts(data->mtd.size, &pdata->chip); - if (pdata->chip.partitions) { - data->parts = pdata->chip.partitions; - err = mtd_device_register(&data->mtd, data->parts, - pdata->chip.nr_partitions); - } else - err = mtd_device_register(&data->mtd, NULL, 0); + err = mtd_device_parse_register(&data->mtd, + pdata->chip.part_probe_types, 0, + pdata->chip.partitions, pdata->chip.nr_partitions); if (!err) return err; @@ -145,8 +130,6 @@ static int __devexit plat_nand_remove(struct platform_device *pdev) res = platform_get_resource(pdev, IORESOURCE_MEM, 0); nand_release(&data->mtd); - if (data->parts && data->parts != pdata->chip.partitions) - kfree(data->parts); if (pdata->ctrl.remove) pdata->ctrl.remove(pdev); iounmap(data->io_base); |