adm5120: merge 3.3 patches
[librecmc/librecmc.git] / target / linux / adm5120 / files / drivers / mtd / trxsplit.c
index 7ae0a457ad2c34c74ca422c5208b31d311ed7407..6f60264ac0318aadd05f442a5ccf0b1605971c08 100644 (file)
@@ -144,7 +144,7 @@ static void trxsplit_create_partitions(struct mtd_info *mtd)
        part = &trx_parts[i];
        part->name = "rootfs";
 
-       err = add_mtd_partitions(mtd, trx_parts, trx_nr_parts);
+       err = mtd_device_register(mtd, trx_parts, trx_nr_parts);
        if (err) {
                printk(KERN_ALERT PFX "adding TRX partitions failed\n");
                return;
@@ -159,7 +159,7 @@ static int trxsplit_refresh_partitions(struct mtd_info *mtd)
                mtd->name, MTD_BLOCK_MAJOR, mtd->index);
 
        /* remove old partitions */
-       del_mtd_partitions(mtd);
+       mtd_device_unregister(mtd);
 
        trxsplit_findtrx(mtd);
        if (!trx_mtd)