Merge "mhi: core: Prevent extra votes for multiple timesync requests"

This commit is contained in:
qctecmdr 2020-07-15 01:30:24 -07:00 • committed by Gerrit - the friendly Code Review server
commit c20b61c403

View file

@ -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)