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
@@ -313,7 +313,7 @@ mtd_pci_probe(struct pci_dev *dev, const struct pci_device_id *id)
|
||||
goto release;
|
||||
|
||||
mtd->owner = THIS_MODULE;
|
||||
add_mtd_device(mtd);
|
||||
mtd_device_register(mtd, NULL, 0);
|
||||
|
||||
pci_set_drvdata(dev, mtd);
|
||||
|
||||
@@ -336,7 +336,7 @@ mtd_pci_remove(struct pci_dev *dev)
|
||||
struct mtd_info *mtd = pci_get_drvdata(dev);
|
||||
struct map_pci_info *map = mtd->priv;
|
||||
|
||||
del_mtd_device(mtd);
|
||||
mtd_device_unregister(mtd);
|
||||
map_destroy(mtd);
|
||||
map->exit(dev, map);
|
||||
kfree(map);
|
||||
|
Reference in New Issue
Block a user