]> Pileus Git - ~andy/linux/blobdiff - drivers/mtd/nand/ndfc.c
Merge branch 'for-linus' of git://neil.brown.name/md
[~andy/linux] / drivers / mtd / nand / ndfc.c
index 1528734b7616aa8122b0410d75055036e5e9890d..f8aacf48ecddf6c12a63a10026e8b948d5f0a8e2 100644 (file)
@@ -42,7 +42,6 @@ struct ndfc_controller {
        struct nand_chip chip;
        int chip_select;
        struct nand_hw_control ndfc_control;
-       struct mtd_partition *parts;
 };
 
 static struct ndfc_controller ndfc_ctrl[NDFC_MAX_CS];
@@ -189,7 +188,7 @@ static int ndfc_chip_init(struct ndfc_controller *ndfc,
        if (!flash_np)
                return -ENODEV;
 
-       ppdata->of_node = flash_np;
+       ppdata.of_node = flash_np;
        ndfc->mtd.name = kasprintf(GFP_KERNEL, "%s.%s",
                        dev_name(&ndfc->ofdev->dev), flash_np->name);
        if (!ndfc->mtd.name) {
@@ -201,11 +200,7 @@ static int ndfc_chip_init(struct ndfc_controller *ndfc,
        if (ret)
                goto err;
 
-       ret = parse_mtd_partitions(&ndfc->mtd, NULL, &ndfc->parts, &ppdata);
-       if (ret < 0)
-               goto err;
-
-       ret = mtd_device_register(&ndfc->mtd, ndfc->parts, ret);
+       ret = mtd_device_parse_register(&ndfc->mtd, NULL, &ppdata, NULL, 0);
 
 err:
        of_node_put(flash_np);