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

Commit 23c509e1 authored by Lina Iyer's avatar Lina Iyer
Browse files

drivers: qcom: rpmh-rsc: optimize redundant read to determine TCS idle



Since the tcs_in_use flag is authoritative enough to determine the
idleness of the TCS, avoid reading the register redundantly.

Change-Id: Ic7737e60ca0029b3cf9d1cc9e613435608be7bc8
Signed-off-by: default avatarLina Iyer <ilina@codeaurora.org>
parent c9a08511
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -92,8 +92,7 @@ static void write_tcs_reg_sync(struct rsc_drv *drv, int reg, int tcs_id,

static bool tcs_is_free(struct rsc_drv *drv, int tcs_id)
{
	return !test_bit(tcs_id, drv->tcs_in_use) &&
	       read_tcs_reg(drv, RSC_DRV_STATUS, tcs_id, 0);
	return !test_bit(tcs_id, drv->tcs_in_use);
}

static struct tcs_group *get_tcs_of_type(struct rsc_drv *drv, int type)