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

Commit c20b61c4 authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

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

parents b17dbdef 033184aa
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -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)