]> Pileus Git - ~andy/linux/blobdiff - drivers/mtd/ubi/build.c
UBI: embed ubi_debug_info field in ubi_device struct
[~andy/linux] / drivers / mtd / ubi / build.c
index fb59604854c9fb4f0438458d764a92b249c6fdb7..a56133585e924048a297041115336a58f3d6d709 100644 (file)
@@ -985,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) {
@@ -1059,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);
@@ -1138,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);