]> git.openfabrics.org - ~emulex/infiniband.git/commitdiff
MIPS: Lantiq: Fix MTD registration of NOR device
authorJohn Crispin <blogic@openwrt.org>
Thu, 9 Jun 2011 17:57:33 +0000 (19:57 +0200)
committerRalf Baechle <ralf@linux-mips.org>
Thu, 20 Oct 2011 14:00:17 +0000 (15:00 +0100)
The 2 functions add_mtd_partitions and del_mtd_partitions were renamed to
mtd_device_register and mtd_device_unregister.

Signed-of-by: John Crispin <blogic@openwrt.org>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/2463/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
drivers/mtd/maps/lantiq-flash.c

index a90cabd7b84d92eb75c061d02805c0db5d15f614..7e508969239e92060e3e3818840756cf0f9c2a4a 100644 (file)
@@ -182,7 +182,7 @@ ltq_mtd_probe(struct platform_device *pdev)
                parts = ltq_mtd_data->parts;
        }
 
-       err = add_mtd_partitions(ltq_mtd->mtd, parts, nr_parts);
+       err = mtd_device_register(ltq_mtd->mtd, parts, nr_parts);
        if (err) {
                dev_err(&pdev->dev, "failed to add partitions\n");
                goto err_destroy;
@@ -208,7 +208,7 @@ ltq_mtd_remove(struct platform_device *pdev)
 
        if (ltq_mtd) {
                if (ltq_mtd->mtd) {
-                       del_mtd_partitions(ltq_mtd->mtd);
+                       mtd_device_unregister(ltq_mtd->mtd);
                        map_destroy(ltq_mtd->mtd);
                }
                if (ltq_mtd->map->virt)