Message ID | 1331643405-759-1-git-send-email-linus.walleij@stericsson.com |
---|---|
State | Superseded |
Headers | show |
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,