mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-24 21:54:34 -04:00
mhi: core: Prevent extra votes for multiple timesync requests
An extra vote is held and not released during cases of multiple or back to back time synchronization requests where the response is still pending and the doorbell is not rung. As only one response is expected, we can safely remove the latest vote placed. Change-Id: I551ac2721af79162959ca301a61657cdf17cf135 Signed-off-by: Bhaumik Bhatt <bbhatt@codeaurora.org>
This commit is contained in:
parent
2f9b2b4199
commit
033184aaa4
1 changed files with 4 additions and 1 deletions
|
|
@ -2685,8 +2685,11 @@ int mhi_get_remote_time(struct mhi_device *mhi_dev,
|
|||
tsync_node->cb_func = cb_func;
|
||||
tsync_node->mhi_dev = mhi_dev;
|
||||
|
||||
if (mhi_tsync->db_response_pending)
|
||||
if (mhi_tsync->db_response_pending) {
|
||||
mhi_device_put(mhi_cntrl->mhi_dev,
|
||||
MHI_VOTE_DEVICE | MHI_VOTE_BUS);
|
||||
goto skip_tsync_db;
|
||||
}
|
||||
|
||||
mhi_tsync->int_sequence++;
|
||||
if (mhi_tsync->int_sequence == 0xFFFFFFFF)
|
||||
|
|
|
|||
Loading…
Reference in a new issue