]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - drivers/mtd/ubi/build.c
KARO: cleanup after merge of Freescale 3.10.17 stuff
[karo-tx-linux.git] / drivers / mtd / ubi / build.c
index 57deae961429d0a161de940072cbc24dc984a008..6e30a3c280d0ffb6c5ad2f4165a5b946843063b7 100644 (file)
@@ -1298,6 +1298,15 @@ static int __init ubi_init(void)
                }
        }
 
+       err = ubiblock_init();
+       if (err) {
+               ubi_err("block: cannot initialize, error %d", err);
+
+               /* See comment above re-ubi_is_module(). */
+               if (ubi_is_module())
+                       goto out_detach;
+       }
+
        return 0;
 
 out_detach:
@@ -1326,6 +1335,8 @@ static void __exit ubi_exit(void)
 {
        int i;
 
+       ubiblock_exit();
+
        for (i = 0; i < UBI_MAX_DEVICES; i++)
                if (ubi_devices[i]) {
                        mutex_lock(&ubi_devices_mutex);