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:
Jamie Iles
2011-05-23 10:23:40 +01:00
committed by David Woodhouse
vanhempi 6b57c11601
commit ee0e87b174
60 muutettua tiedostoa jossa 160 lisäystä ja 150 poistoa

Näytä tiedosto

@@ -684,9 +684,10 @@ static int __init lart_flash_init (void)
#endif
#ifndef HAVE_PARTITIONS
result = add_mtd_device (&mtd);
result = mtd_device_register(&mtd, NULL, 0);
#else
result = add_mtd_partitions (&mtd,lart_partitions, ARRAY_SIZE(lart_partitions));
result = mtd_device_register(&mtd, lart_partitions,
ARRAY_SIZE(lart_partitions));
#endif
return (result);
@@ -695,9 +696,9 @@ static int __init lart_flash_init (void)
static void __exit lart_flash_exit (void)
{
#ifndef HAVE_PARTITIONS
del_mtd_device (&mtd);
mtd_device_unregister(&mtd);
#else
del_mtd_partitions (&mtd);
mtd_device_unregister(&mtd);
#endif
}