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
@@ -67,7 +67,7 @@ static void ichxrom_cleanup(struct ichxrom_window *window)
|
||||
list_for_each_entry_safe(map, scratch, &window->maps, list) {
|
||||
if (map->rsrc.parent)
|
||||
release_resource(&map->rsrc);
|
||||
del_mtd_device(map->mtd);
|
||||
mtd_device_unregister(map->mtd);
|
||||
map_destroy(map->mtd);
|
||||
list_del(&map->list);
|
||||
kfree(map);
|
||||
@@ -287,7 +287,7 @@ static int __devinit ichxrom_init_one (struct pci_dev *pdev,
|
||||
|
||||
/* Now that the mtd devices is complete claim and export it */
|
||||
map->mtd->owner = THIS_MODULE;
|
||||
if (add_mtd_device(map->mtd)) {
|
||||
if (mtd_device_register(map->mtd, NULL, 0)) {
|
||||
map_destroy(map->mtd);
|
||||
map->mtd = NULL;
|
||||
goto out;
|
||||
|
Reference in New Issue
Block a user