mhi: core: Synchronize time sync operation and removal
If time sync is requested by user space when endpoint is shutting
down dev_wake count gets incremented. This is causing assert when
shutdown API checks the dev_wake count and it is still non-zero.
Fix this issue by protecting time sync API and removal of time sync
under tsync_mutex. This helps to take care of a race condition when
time sync is requested while time sync remove in progress and also
makes sure that dev_wake count becomes zero when time sync remove
is done to prevent assert condition.
Change-Id: I4e758611613e541537dd900306aa81dd3b4a9f3a
Signed-off-by:
Hemant Kumar <hemantk@codeaurora.org>
Loading
Please register or sign in to comment