[PATCH v2 12/17] drivers:mtd:ubi:add disable bakvol while ubi detach
From: Bean Huo
Date: Mon Feb 01 2016 - 21:38:17 EST
From: Bean Huo <beanhuo@xxxxxxxxxx>
When ubi device is detached, bakvol should be disable and free pre-allocation
memory.
Signed-off-by: BeanHuo <beanhuo@xxxxxxxxxx>
---
drivers/mtd/ubi/build.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/mtd/ubi/build.c b/drivers/mtd/ubi/build.c
index 22fd19c..4f7a466 100644
--- a/drivers/mtd/ubi/build.c
+++ b/drivers/mtd/ubi/build.c
@@ -1118,6 +1118,8 @@ int ubi_detach_mtd_dev(int ubi_num, int anyway)
*/
get_device(&ubi->dev);
+ clear_bakvol(ubi);
+
ubi_debugfs_exit_dev(ubi);
uif_close(ubi);
--
1.9.1