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:

committad av
David Woodhouse

förälder
6b57c11601
incheckning
ee0e87b174
@@ -116,14 +116,14 @@ static int __init init_netsc520(void)
|
||||
}
|
||||
|
||||
mymtd->owner = THIS_MODULE;
|
||||
add_mtd_partitions( mymtd, partition_info, NUM_PARTITIONS );
|
||||
mtd_device_register(mymtd, partition_info, NUM_PARTITIONS);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void __exit cleanup_netsc520(void)
|
||||
{
|
||||
if (mymtd) {
|
||||
del_mtd_partitions(mymtd);
|
||||
mtd_device_unregister(mymtd);
|
||||
map_destroy(mymtd);
|
||||
}
|
||||
if (netsc520_map.virt) {
|
||||
|
Referens i nytt ärende
Block a user