Skip to content

Commit

Permalink
ASoC: zte: spdif: remove duplicate initialization of dma_data
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Colin Ian King authored and Mark Brown committed Sep 19, 2017
1 parent 2bd6bf0 commit b614583
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sound/soc/zte/zx-spdif.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit b614583

Please sign in to comment.