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: Lina Iyer <ilina@codeaurora.org>
This commit is contained in:
Lina Iyer 2019-07-30 12:07:02 -07:00
commit 23c509e166

View file

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