Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit dda5c999 authored by Sreelakshmi Gownipalli's avatar Sreelakshmi Gownipalli Committed by Gerrit - the friendly Code Review server
Browse files

diag: Flush diag mhi workqueue before closing mhi channel



On mhi channel remove call flush diag mhi workqueue before
calling close on mhi diag channel.

Change-Id: I89b581ed05242f2875c37d5a9ed98fd55c54201d
Signed-off-by: default avatarSreelakshmi Gownipalli <sgownipa@codeaurora.org>
parent cc869a5a
Loading
Loading
Loading
Loading
+3 −6
Original line number Diff line number Diff line
@@ -215,14 +215,11 @@ static int __mhi_close(struct diag_mhi_info *mhi_info, int close_flag)

	atomic_set(&(mhi_info->read_ch.opened), 0);
	atomic_set(&(mhi_info->write_ch.opened), 0);
	if (close_flag == CLOSE_CHANNELS)
		mhi_unprepare_from_transfer(mhi_info->mhi_dev);

	if (!(atomic_read(&(mhi_info->read_ch.opened))))
	flush_workqueue(mhi_info->mhi_wq);

	if (!(atomic_read(&(mhi_info->write_ch.opened))))
		flush_workqueue(mhi_info->mhi_wq);
	if (close_flag == CLOSE_CHANNELS)
		mhi_unprepare_from_transfer(mhi_info->mhi_dev);

	mhi_buf_tbl_clear(mhi_info);
	diag_remote_dev_close(mhi_info->dev_id);