diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/mtd/nand/omap2.c | 4 | ||||
-rw-r--r-- | drivers/mtd/onenand/omap2.c | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/drivers/mtd/nand/omap2.c b/drivers/mtd/nand/omap2.c index 0002d5e94f0d..1d333497cfcb 100644 --- a/drivers/mtd/nand/omap2.c +++ b/drivers/mtd/nand/omap2.c @@ -1332,6 +1332,7 @@ static int omap_nand_probe(struct platform_device *pdev) dma_cap_mask_t mask; unsigned sig; struct resource *res; + struct mtd_part_parser_data ppdata = {}; pdata = pdev->dev.platform_data; if (pdata == NULL) { @@ -1557,7 +1558,8 @@ static int omap_nand_probe(struct platform_device *pdev) goto out_release_mem_region; } - mtd_device_parse_register(&info->mtd, NULL, NULL, pdata->parts, + ppdata.of_node = pdata->of_node; + mtd_device_parse_register(&info->mtd, NULL, &ppdata, pdata->parts, pdata->nr_parts); platform_set_drvdata(pdev, &info->mtd); diff --git a/drivers/mtd/onenand/omap2.c b/drivers/mtd/onenand/omap2.c index 065f3fe02a2f..eec2aedb4ab8 100644 --- a/drivers/mtd/onenand/omap2.c +++ b/drivers/mtd/onenand/omap2.c @@ -637,6 +637,7 @@ static int omap2_onenand_probe(struct platform_device *pdev) struct onenand_chip *this; int r; struct resource *res; + struct mtd_part_parser_data ppdata = {}; pdata = pdev->dev.platform_data; if (pdata == NULL) { @@ -767,7 +768,8 @@ static int omap2_onenand_probe(struct platform_device *pdev) if ((r = onenand_scan(&c->mtd, 1)) < 0) goto err_release_regulator; - r = mtd_device_parse_register(&c->mtd, NULL, NULL, + ppdata.of_node = pdata->of_node; + r = mtd_device_parse_register(&c->mtd, NULL, &ppdata, pdata ? pdata->parts : NULL, pdata ? pdata->nr_parts : 0); if (r) |