mtd: convert remaining users to mtd_device_register()
The older add_mtd_device()/add_mtd_partitions() and their removal counterparts will soon be gone. Replace uses with mtd_device_register() and mtd_device_unregister(). Signed-off-by: Jamie Iles <jamie@jamieiles.com> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
This commit is contained in:

committed by
David Woodhouse

parent
6b57c11601
commit
ee0e87b174
@@ -88,7 +88,7 @@ map:
|
||||
sram_mtd->owner = THIS_MODULE;
|
||||
sram_mtd->erasesize = 16;
|
||||
|
||||
if (add_mtd_device(sram_mtd)) {
|
||||
if (mtd_device_register(sram_mtd, NULL, 0)) {
|
||||
printk("NV-RAM device addition failed\n");
|
||||
err = -ENOMEM;
|
||||
goto out_probe;
|
||||
@@ -111,7 +111,7 @@ out:
|
||||
static void __exit cleanup_autcpu12_maps(void)
|
||||
{
|
||||
if (sram_mtd) {
|
||||
del_mtd_device(sram_mtd);
|
||||
mtd_device_unregister(sram_mtd);
|
||||
map_destroy(sram_mtd);
|
||||
iounmap((void *)autcpu12_sram_map.virt);
|
||||
}
|
||||
|
Reference in New Issue
Block a user