Commit 2e5db86d authored by John Crispin's avatar John Crispin Committed by Ralf Baechle

MIPS: Lantiq: Fix MTD registration of NOR device

The 2 functions add_mtd_partitions and del_mtd_partitions were renamed to
mtd_device_register and mtd_device_unregister.
Signed-of-by: default avatarJohn Crispin <blogic@openwrt.org>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/2463/Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
parent 899e3ee4
...@@ -182,7 +182,7 @@ ltq_mtd_probe(struct platform_device *pdev) ...@@ -182,7 +182,7 @@ ltq_mtd_probe(struct platform_device *pdev)
parts = ltq_mtd_data->parts; 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) { if (err) {
dev_err(&pdev->dev, "failed to add partitions\n"); dev_err(&pdev->dev, "failed to add partitions\n");
goto err_destroy; goto err_destroy;
...@@ -208,7 +208,7 @@ ltq_mtd_remove(struct platform_device *pdev) ...@@ -208,7 +208,7 @@ ltq_mtd_remove(struct platform_device *pdev)
if (ltq_mtd) { if (ltq_mtd) {
if (ltq_mtd->mtd) { if (ltq_mtd->mtd) {
del_mtd_partitions(ltq_mtd->mtd); mtd_device_unregister(ltq_mtd->mtd);
map_destroy(ltq_mtd->mtd); map_destroy(ltq_mtd->mtd);
} }
if (ltq_mtd->map->virt) if (ltq_mtd->map->virt)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment