[PATCH v2 12/17] drivers:mtd:ubi:add disable bakvol while ubi detach

Bean Huo jackyard88 at gmail.com
Mon Feb 1 18:30:47 PST 2016


From: Bean Huo <beanhuo at micron.com>

When ubi device is detached, bakvol should be disable and free pre-allocation
memory.

Signed-off-by: BeanHuo <beanhuo at micron.com>
---
 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




More information about the linux-mtd mailing list