diff options
Diffstat (limited to 'drivers/mtd/maps/pmcmsp-flash.c')
-rw-r--r-- | drivers/mtd/maps/pmcmsp-flash.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/mtd/maps/pmcmsp-flash.c b/drivers/mtd/maps/pmcmsp-flash.c index 64aea6acd48e..744ca5cacc9b 100644 --- a/drivers/mtd/maps/pmcmsp-flash.c +++ b/drivers/mtd/maps/pmcmsp-flash.c | |||
@@ -173,7 +173,7 @@ static int __init init_msp_flash(void) | |||
173 | msp_flash[i] = do_map_probe("cfi_probe", &msp_maps[i]); | 173 | msp_flash[i] = do_map_probe("cfi_probe", &msp_maps[i]); |
174 | if (msp_flash[i]) { | 174 | if (msp_flash[i]) { |
175 | msp_flash[i]->owner = THIS_MODULE; | 175 | msp_flash[i]->owner = THIS_MODULE; |
176 | add_mtd_partitions(msp_flash[i], msp_parts[i], pcnt); | 176 | mtd_device_register(msp_flash[i], msp_parts[i], pcnt); |
177 | } else { | 177 | } else { |
178 | printk(KERN_ERR "map probe failed for flash\n"); | 178 | printk(KERN_ERR "map probe failed for flash\n"); |
179 | ret = -ENXIO; | 179 | ret = -ENXIO; |
@@ -188,7 +188,7 @@ static int __init init_msp_flash(void) | |||
188 | 188 | ||
189 | cleanup_loop: | 189 | cleanup_loop: |
190 | while (i--) { | 190 | while (i--) { |
191 | del_mtd_partitions(msp_flash[i]); | 191 | mtd_device_unregister(msp_flash[i]); |
192 | map_destroy(msp_flash[i]); | 192 | map_destroy(msp_flash[i]); |
193 | kfree(msp_maps[i].name); | 193 | kfree(msp_maps[i].name); |
194 | iounmap(msp_maps[i].virt); | 194 | iounmap(msp_maps[i].virt); |
@@ -207,7 +207,7 @@ static void __exit cleanup_msp_flash(void) | |||
207 | int i; | 207 | int i; |
208 | 208 | ||
209 | for (i = 0; i < fcnt; i++) { | 209 | for (i = 0; i < fcnt; i++) { |
210 | del_mtd_partitions(msp_flash[i]); | 210 | mtd_device_unregister(msp_flash[i]); |
211 | map_destroy(msp_flash[i]); | 211 | map_destroy(msp_flash[i]); |
212 | iounmap((void *)msp_maps[i].virt); | 212 | iounmap((void *)msp_maps[i].virt); |
213 | 213 | ||