Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs...
[pandora-kernel.git] / drivers / mtd / maps / pmcmsp-flash.c
index 64aea6a..744ca5c 100644 (file)
@@ -173,7 +173,7 @@ static int __init init_msp_flash(void)
                msp_flash[i] = do_map_probe("cfi_probe", &msp_maps[i]);
                if (msp_flash[i]) {
                        msp_flash[i]->owner = THIS_MODULE;
-                       add_mtd_partitions(msp_flash[i], msp_parts[i], pcnt);
+                       mtd_device_register(msp_flash[i], msp_parts[i], pcnt);
                } else {
                        printk(KERN_ERR "map probe failed for flash\n");
                        ret = -ENXIO;
@@ -188,7 +188,7 @@ static int __init init_msp_flash(void)
 
 cleanup_loop:
        while (i--) {
-               del_mtd_partitions(msp_flash[i]);
+               mtd_device_unregister(msp_flash[i]);
                map_destroy(msp_flash[i]);
                kfree(msp_maps[i].name);
                iounmap(msp_maps[i].virt);
@@ -207,7 +207,7 @@ static void __exit cleanup_msp_flash(void)
        int i;
 
        for (i = 0; i < fcnt; i++) {
-               del_mtd_partitions(msp_flash[i]);
+               mtd_device_unregister(msp_flash[i]);
                map_destroy(msp_flash[i]);
                iounmap((void *)msp_maps[i].virt);