summaryrefslogtreecommitdiff
path: root/drivers/mtd/ubi/gluebi.c
diff options
context:
space:
mode:
authorJamie Iles <jamie@jamieiles.com>2011-05-23 13:23:40 +0400
committerDavid Woodhouse <David.Woodhouse@intel.com>2011-05-25 05:25:00 +0400
commitee0e87b174bb41f0310cf089262bf5dd8f95a212 (patch)
tree444b7eb1cc1a807561889a4cffe15fde11761645 /drivers/mtd/ubi/gluebi.c
parent6b57c11601c8fa4bfa046513c4df155b3b58ea89 (diff)
downloadlinux-ee0e87b174bb41f0310cf089262bf5dd8f95a212.tar.xz
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>
Diffstat (limited to 'drivers/mtd/ubi/gluebi.c')
-rw-r--r--drivers/mtd/ubi/gluebi.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/mtd/ubi/gluebi.c b/drivers/mtd/ubi/gluebi.c
index 9aa81584c8a2..941bc3c05d6e 100644
--- a/drivers/mtd/ubi/gluebi.c
+++ b/drivers/mtd/ubi/gluebi.c
@@ -365,7 +365,7 @@ static int gluebi_create(struct ubi_device_info *di,
vi->vol_id);
mutex_unlock(&devices_mutex);
- if (add_mtd_device(mtd)) {
+ if (mtd_device_register(mtd, NULL, 0)) {
err_msg("cannot add MTD device");
kfree(mtd->name);
kfree(gluebi);
@@ -407,7 +407,7 @@ static int gluebi_remove(struct ubi_volume_info *vi)
return err;
mtd = &gluebi->mtd;
- err = del_mtd_device(mtd);
+ err = mtd_device_unregister(mtd);
if (err) {
err_msg("cannot remove fake MTD device %d, UBI device %d, "
"volume %d, error %d", mtd->index, gluebi->ubi_num,
@@ -524,7 +524,7 @@ static void __exit ubi_gluebi_exit(void)
int err;
struct mtd_info *mtd = &gluebi->mtd;
- err = del_mtd_device(mtd);
+ err = mtd_device_unregister(mtd);
if (err)
err_msg("error %d while removing gluebi MTD device %d, "
"UBI device %d, volume %d - ignoring", err,