Skip to content

Commit

Permalink
MIPS: Lantiq: Fix MTD registration of NOR device
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
John Crispin authored and Ralf Baechle committed Oct 20, 2011
1 parent 899e3ee commit 2e5db86
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/mtd/maps/lantiq-flash.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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)
Expand Down

0 comments on commit 2e5db86

Please sign in to comment.