Skip to content

Commit 23badca

Browse files
wenliangwubroonie
authored andcommitted
ASoC: mediatek: mt8188: add missing initialization
In etdm dai driver, dai_etdm_parse_of() function is used to parse dts properties to get parameters. There are two for-loops which are sepearately for all etdm and etdm input only cases. In etdm in only loop, dai_id is not initialized, so it keeps the value intiliazed in another loop. In the patch, add the missing initialization to fix the unexpected parsing problem. Fixes: 2babb47 ("ASoC: mediatek: mt8188: support etdm in platform driver") Signed-off-by: Trevor Wu <[email protected]> Reviewed-by: AngeloGioacchino Del Regno <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent e48223e commit 23badca

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

sound/soc/mediatek/mt8188/mt8188-dai-etdm.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2498,6 +2498,9 @@ static void mt8188_dai_etdm_parse_of(struct mtk_base_afe *afe)
24982498

24992499
/* etdm in only */
25002500
for (i = 0; i < 2; i++) {
2501+
dai_id = ETDM_TO_DAI_ID(i);
2502+
etdm_data = afe_priv->dai_priv[dai_id];
2503+
25012504
snprintf(prop, sizeof(prop), "mediatek,%s-chn-disabled",
25022505
of_afe_etdms[i].name);
25032506

0 commit comments

Comments
 (0)