Commit eb540d39 authored by Sylwester Nawrocki's avatar Sylwester Nawrocki Committed by Mark Brown

ASoC: samsung: i2s: Simplify pri_dai, sec_dai pointers usage

If the probe call is on the primary DAI we can use 'other' in place of
i2s->sec_dai, if the probe call is on the secondary DAI we can use 'i2s'
in place of other->sec_dai.

While at it fix one whitespace issue.
Signed-off-by: default avatarSylwester Nawrocki <s.nawrocki@samsung.com>
Acked-by: default avatarKrzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 1c3816a1
...@@ -1057,18 +1057,17 @@ static int samsung_i2s_dai_probe(struct snd_soc_dai *dai) ...@@ -1057,18 +1057,17 @@ static int samsung_i2s_dai_probe(struct snd_soc_dai *dai)
pm_runtime_get_sync(dai->dev); pm_runtime_get_sync(dai->dev);
if (is_secondary(i2s)) { /* If this is probe on the secondary DAI */ if (is_secondary(i2s)) { /* If this is probe on the secondary DAI */
snd_soc_dai_init_dma_data(dai, &other->sec_dai->dma_playback, snd_soc_dai_init_dma_data(dai, &i2s->dma_playback, NULL);
NULL);
} else { } else {
snd_soc_dai_init_dma_data(dai, &i2s->dma_playback, snd_soc_dai_init_dma_data(dai, &i2s->dma_playback,
&i2s->dma_capture); &i2s->dma_capture);
if (priv->quirks & QUIRK_NEED_RSTCLR) if (priv->quirks & QUIRK_NEED_RSTCLR)
writel(CON_RSTCLR, priv->addr + I2SCON); writel(CON_RSTCLR, priv->addr + I2SCON);
if (priv->quirks & QUIRK_SUPPORTS_IDMA) if (priv->quirks & QUIRK_SUPPORTS_IDMA)
idma_reg_addr_init(priv->addr, idma_reg_addr_init(priv->addr,
i2s->sec_dai->idma_playback.addr); other->idma_playback.addr);
} }
/* Reset any constraint on RFS and BFS */ /* Reset any constraint on RFS and BFS */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment