Selaa lähdekoodia

msm: camera: req_mgr: Clean up debugfs entry

At the time of unbind, all debugfs entry needs to be properly
clean up. This change adds debugfs directory removal alongwith
entries under debugfs root entry.

CRs-Fixed: 2675526
Change-Id: I3eba11db032dbafe5f7d444e8c5a823639ba0e74
Signed-off-by: Jigarkumar Zala <[email protected]>
Jigarkumar Zala 5 vuotta sitten
vanhempi
sitoutus
5a5fb4e8f0
2 muutettua tiedostoa jossa 2 lisäystä ja 2 poistoa
  1. 1 0
      drivers/cam_req_mgr/cam_mem_mgr.c
  2. 1 2
      drivers/cam_req_mgr/cam_req_mgr_debug.c

+ 1 - 0
drivers/cam_req_mgr/cam_mem_mgr.c

@@ -955,6 +955,7 @@ void cam_mem_mgr_deinit(void)
 {
 	atomic_set(&cam_mem_mgr_state, CAM_MEM_MGR_UNINITIALIZED);
 	cam_mem_mgr_cleanup_table();
+	debugfs_remove_recursive(tbl.dentry);
 	mutex_lock(&tbl.m_lock);
 	bitmap_zero(tbl.bitmap, tbl.bits);
 	kfree(tbl.bitmap);

+ 1 - 2
drivers/cam_req_mgr/cam_req_mgr_debug.c

@@ -141,6 +141,5 @@ int cam_req_mgr_debug_register(struct cam_req_mgr_core_device *core_dev)
 
 void cam_req_mgr_debug_unregister(void)
 {
-	if (!debugfs_root)
-		debugfs_remove_recursive(debugfs_root);
+	debugfs_remove_recursive(debugfs_root);
 }