[PATCH 2/2] ASoC: qcom: lpass: Avoid redundant DAI ID lookup

Stephan Gerhold stephan at gerhold.net
Thu Jan 14 10:46:15 CET 2021


The "dai_id" given into LPAIF_INTFDMA_REG(...) is already the real
DAI ID, not an index into v->dai_driver. Looking it up again seems
entirely redundant.

Cc: Srinivasa Rao Mandadapu <srivasam at codeaurora.org>
Cc: Srinivas Kandagatla <srinivas.kandagatla at linaro.org>
Signed-off-by: Stephan Gerhold <stephan at gerhold.net>
---
 sound/soc/qcom/lpass-lpaif-reg.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/qcom/lpass-lpaif-reg.h b/sound/soc/qcom/lpass-lpaif-reg.h
index 332f1b9ba674..583ca53836a5 100644
--- a/sound/soc/qcom/lpass-lpaif-reg.h
+++ b/sound/soc/qcom/lpass-lpaif-reg.h
@@ -133,7 +133,7 @@
 #define	LPAIF_WRDMAPERCNT_REG(v, chan)	LPAIF_WRDMA_REG_ADDR(v, 0x14, (chan))
 
 #define LPAIF_INTFDMA_REG(v, chan, reg, dai_id)  \
-		((v->dai_driver[dai_id].id ==  v->hdmi_dai) ? \
+	((dai_id ==  v->hdmi_dai) ? \
 		LPAIF_HDMI_RDMA##reg##_REG(v, chan) : \
 		 LPAIF_RDMA##reg##_REG(v, chan))
 
-- 
2.30.0



More information about the Alsa-devel mailing list