]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/mtd/ubi/build.c
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph...
[karo-tx-linux.git] / drivers / mtd / ubi / build.c
index 344b4cb49d4ea1a1075653ed788377b16925095b..a56133585e924048a297041115336a58f3d6d709 100644 (file)
@@ -825,8 +825,7 @@ static int autoresize(struct ubi_device *ubi, int vol_id)
                 * No available PEBs to re-size the volume, clear the flag on
                 * flash and exit.
                 */
-               memcpy(&vtbl_rec, &ubi->vtbl[vol_id],
-                      sizeof(struct ubi_vtbl_record));
+               vtbl_rec = ubi->vtbl[vol_id];
                err = ubi_change_vtbl_record(ubi, vol_id, &vtbl_rec);
                if (err)
                        ubi_err("cannot clean auto-resize flag for volume %d",
@@ -986,14 +985,10 @@ int ubi_attach_mtd_dev(struct mtd_info *mtd, int ubi_num,
        if (!ubi->fm_buf)
                goto out_free;
 #endif
-       err = ubi_debugging_init_dev(ubi);
-       if (err)
-               goto out_free;
-
        err = ubi_attach(ubi, 0);
        if (err) {
                ubi_err("failed to attach mtd%d, error %d", mtd->index, err);
-               goto out_debugging;
+               goto out_free;
        }
 
        if (ubi->autoresize_vol_id != -1) {
@@ -1060,8 +1055,6 @@ out_detach:
        ubi_wl_close(ubi);
        ubi_free_internal_volumes(ubi);
        vfree(ubi->vtbl);
-out_debugging:
-       ubi_debugging_exit_dev(ubi);
 out_free:
        vfree(ubi->peb_buf);
        vfree(ubi->fm_buf);
@@ -1139,7 +1132,6 @@ int ubi_detach_mtd_dev(int ubi_num, int anyway)
        ubi_free_internal_volumes(ubi);
        vfree(ubi->vtbl);
        put_mtd_device(ubi->mtd);
-       ubi_debugging_exit_dev(ubi);
        vfree(ubi->peb_buf);
        vfree(ubi->fm_buf);
        ubi_msg("mtd%d is detached from ubi%d", ubi->mtd->index, ubi->ubi_num);