summaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorColin Ian King <colin.king@canonical.com>2017-09-18 09:56:38 +0100
committerMark Brown <broonie@kernel.org>2017-09-19 12:56:50 +0100
commitb6145837218cb984245aea5ccd9201aeb5eb0501 (patch)
treecfab21c34a5bebc321769a5d75cd0837f5e8d2f0 /sound
parent2bd6bf03f4c1c59381d62c61d03f6cc3fe71f66e (diff)
downloadlinux-b6145837218cb984245aea5ccd9201aeb5eb0501.tar.gz
linux-b6145837218cb984245aea5ccd9201aeb5eb0501.tar.bz2
linux-b6145837218cb984245aea5ccd9201aeb5eb0501.zip
ASoC: zte: spdif: remove duplicate initialization of dma_data
dma_data is being initialized twice, remove the unused first initialization and use the latter one instead. Fixed clang warning: "warning: Value stored to 'dma_data' during its initialization is never read" Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/zte/zx-spdif.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sound/soc/zte/zx-spdif.c b/sound/soc/zte/zx-spdif.c
index b143f9f682d2..17b6ce35037a 100644
--- a/sound/soc/zte/zx-spdif.c
+++ b/sound/soc/zte/zx-spdif.c
@@ -139,11 +139,11 @@ static int zx_spdif_hw_params(struct snd_pcm_substream *substream,
{
struct zx_spdif_info *zx_spdif = dev_get_drvdata(socdai->dev);
struct zx_spdif_info *spdif = snd_soc_dai_get_drvdata(socdai);
- struct snd_dmaengine_dai_dma_data *dma_data = &zx_spdif->dma_data;
+ struct snd_dmaengine_dai_dma_data *dma_data =
+ snd_soc_dai_get_dma_data(socdai, substream);
u32 val, ch_num, rate;
int ret;
- dma_data = snd_soc_dai_get_dma_data(socdai, substream);
dma_data->addr_width = params_width(params) >> 3;
val = readl_relaxed(zx_spdif->reg_base + ZX_CTRL);