diff options
author | Arnd Bergmann <arnd@arndb.de> | 2011-11-24 00:47:41 +0400 |
---|---|---|
committer | Arnd Bergmann <arnd@arndb.de> | 2011-11-24 00:47:41 +0400 |
commit | 58a273745fbb2fbd01d26e7a60f0acc8c1d99469 (patch) | |
tree | bc16200f3b6ea150b298422754e32959eaa339bc /drivers/mtd/onenand/generic.c | |
parent | 951c486f62490e032da0ad17e93270b0cfb6687f (diff) | |
parent | 0116da4fcc1ae8a80d9002441e98768f2a6fa2fe (diff) | |
download | linux-58a273745fbb2fbd01d26e7a60f0acc8c1d99469.tar.xz |
Merge branches 'drivers/macb-gem' and 'drivers/pxa-gpio' into next/drivers
Diffstat (limited to 'drivers/mtd/onenand/generic.c')
-rw-r--r-- | drivers/mtd/onenand/generic.c | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/drivers/mtd/onenand/generic.c b/drivers/mtd/onenand/generic.c index 2d70d354d846..7813095264a5 100644 --- a/drivers/mtd/onenand/generic.c +++ b/drivers/mtd/onenand/generic.c @@ -30,11 +30,8 @@ */ #define DRIVER_NAME "onenand-flash" -static const char *part_probes[] = { "cmdlinepart", NULL, }; - struct onenand_info { struct mtd_info mtd; - struct mtd_partition *parts; struct onenand_chip onenand; }; @@ -73,13 +70,9 @@ static int __devinit generic_onenand_probe(struct platform_device *pdev) goto out_iounmap; } - err = parse_mtd_partitions(&info->mtd, part_probes, &info->parts, 0); - if (err > 0) - mtd_device_register(&info->mtd, info->parts, err); - else if (err <= 0 && pdata && pdata->parts) - mtd_device_register(&info->mtd, pdata->parts, pdata->nr_parts); - else - err = mtd_device_register(&info->mtd, NULL, 0); + err = mtd_device_parse_register(&info->mtd, NULL, 0, + pdata ? pdata->parts : NULL, + pdata ? pdata->nr_parts : 0); platform_set_drvdata(pdev, info); @@ -104,7 +97,6 @@ static int __devexit generic_onenand_remove(struct platform_device *pdev) platform_set_drvdata(pdev, NULL); if (info) { - mtd_device_unregister(&info->mtd); onenand_release(&info->mtd); release_mem_region(res->start, size); iounmap(info->onenand.base); |