UBI: Enable re-initializing of the "ubi part" command
With this patch now, the user can call "ubi part" multiple times to
re-connect the UBI device to another MTD partition.
Signed-off-by: Stefan Roese <sr@denx.de>
diff --git a/drivers/mtd/ubi/build.c b/drivers/mtd/ubi/build.c
index 17cabb2..bdf75c9 100644
--- a/drivers/mtd/ubi/build.c
+++ b/drivers/mtd/ubi/build.c
@@ -1059,6 +1059,7 @@
misc_deregister(&ubi_ctrl_cdev);
class_remove_file(ubi_class, &ubi_version);
class_destroy(ubi_class);
+ mtd_devs = 0;
}
module_exit(ubi_exit);