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
@@ -266,10 +266,10 @@ static int __init init_sc520cdp(void)
|
||||
/* Combine the two flash banks into a single MTD device & register it: */
|
||||
merged_mtd = mtd_concat_create(mymtd, 2, "SC520CDP Flash Banks #0 and #1");
|
||||
if(merged_mtd)
|
||||
add_mtd_device(merged_mtd);
|
||||
mtd_device_register(merged_mtd, NULL, 0);
|
||||
}
|
||||
if(devices_found == 3) /* register the third (DIL-Flash) device */
|
||||
add_mtd_device(mymtd[2]);
|
||||
mtd_device_register(mymtd[2], NULL, 0);
|
||||
return(devices_found ? 0 : -ENXIO);
|
||||
}
|
||||
|
||||
@@ -278,11 +278,11 @@ static void __exit cleanup_sc520cdp(void)
|
||||
int i;
|
||||
|
||||
if (merged_mtd) {
|
||||
del_mtd_device(merged_mtd);
|
||||
mtd_device_unregister(merged_mtd);
|
||||
mtd_concat_destroy(merged_mtd);
|
||||
}
|
||||
if (mymtd[2])
|
||||
del_mtd_device(mymtd[2]);
|
||||
mtd_device_unregister(mymtd[2]);
|
||||
|
||||
for (i = 0; i < NUM_FLASH_BANKS; i++) {
|
||||
if (mymtd[i])
|
||||
|
Reference in New Issue
Block a user