drivers: rkflash: Add mutex for deinit ops.

Change-Id: I477c161cb22f58263963a4d8e0d08eaeda676f69
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
This commit is contained in:
Jon Lin
2021-09-02 11:11:45 +08:00
committed by Tao Huang
parent 32210c5c1e
commit abce936f23

View File

@@ -776,6 +776,8 @@ void rkflash_dev_shutdown(void)
wake_up(&mytr.thread_wq);
wait_for_completion(&mytr.thread_exit);
}
mutex_lock(&g_flash_ops_mutex);
g_boot_ops->deinit();
mutex_unlock(&g_flash_ops_mutex);
pr_info("rkflash_shutdown:OK\n");
}