Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wirel...
[pandora-kernel.git] / drivers / mtd / maps / uclinux.c
index 3500929..6793074 100644 (file)
@@ -89,11 +89,7 @@ static int __init uclinux_mtd_init(void)
        mtd->priv = mapp;
 
        uclinux_ram_mtdinfo = mtd;
-#ifdef CONFIG_MTD_PARTITIONS
-       add_mtd_partitions(mtd, uclinux_romfs, NUM_PARTITIONS);
-#else
-       add_mtd_device(mtd);
-#endif
+       mtd_device_register(mtd, uclinux_romfs, NUM_PARTITIONS);
 
        return(0);
 }
@@ -103,11 +99,7 @@ static int __init uclinux_mtd_init(void)
 static void __exit uclinux_mtd_cleanup(void)
 {
        if (uclinux_ram_mtdinfo) {
-#ifdef CONFIG_MTD_PARTITIONS
-               del_mtd_partitions(uclinux_ram_mtdinfo);
-#else
-               del_mtd_device(uclinux_ram_mtdinfo);
-#endif
+               mtd_device_unregister(uclinux_ram_mtdinfo);
                map_destroy(uclinux_ram_mtdinfo);
                uclinux_ram_mtdinfo = NULL;
        }