Message ID | 1331643405-759-1-git-send-email-linus.walleij@stericsson.com |
---|---|
State | New, archived |
Headers | show |
On Tue, 2012-03-13 at 13:56 +0100, Linus Walleij wrote: > From: Linus Walleij <linus.walleij@linaro.org> > > Commit 0d04eda1430e9a796214bee644b7e05d99cfe613 > "mtd: fsmc_nand.c: use mtd_device_parse_register" > accidentally broke the platform data partition supply > capability in the FSMC driver, this make it work again. > Tested on the U300 that use this scheme. > > Cc: stable@kernel.org Specify the version please: [3.2+] > Cc: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> > Signed-off-by: Linus Walleij <linus.walleij@linaro.org> This patch does not apply on top of the l2-mtd.git tree.
diff --git a/drivers/mtd/nand/fsmc_nand.c b/drivers/mtd/nand/fsmc_nand.c index e53b760..fd9f94f 100644 --- a/drivers/mtd/nand/fsmc_nand.c +++ b/drivers/mtd/nand/fsmc_nand.c @@ -713,7 +713,12 @@ static int __init fsmc_nand_probe(struct platform_device *pdev) * Check for partition info passed */ host->mtd.name = "nand"; - ret = mtd_device_parse_register(&host->mtd, NULL, 0, + if (pdata->partitions) + ret = mtd_device_parse_register(&host->mtd, NULL, 0, + pdata->partitions, + pdata->nr_partitions); + else + ret = mtd_device_parse_register(&host->mtd, NULL, 0, host->mtd.size <= 0x04000000 ? partition_info_16KB_blk : partition_info_128KB_blk,