Commit 9bdc573d authored by Kuninori Morimoto's avatar Kuninori Morimoto Committed by Mark Brown

ASoC: soc-pcm: cleanup cppcheck warning at dpcm_runtime_setup_be_chan()

This patch cleanups below cppcheck warning.

sound/soc/soc-pcm.c:1624:30: style: The scope of the variable 'codec_stream' can be reduced. [variableScope]
  struct snd_soc_pcm_stream *codec_stream;
                             ^
Signed-off-by: default avatarKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87o8aozf28.wl-kuninori.morimoto.gx@renesas.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent 7931df9b
...@@ -1625,7 +1625,6 @@ static void dpcm_runtime_setup_be_chan(struct snd_pcm_substream *substream) ...@@ -1625,7 +1625,6 @@ static void dpcm_runtime_setup_be_chan(struct snd_pcm_substream *substream)
for_each_dpcm_be(fe, stream, dpcm) { for_each_dpcm_be(fe, stream, dpcm) {
struct snd_soc_pcm_runtime *be = dpcm->be; struct snd_soc_pcm_runtime *be = dpcm->be;
struct snd_soc_pcm_stream *codec_stream;
struct snd_soc_pcm_stream *cpu_stream; struct snd_soc_pcm_stream *cpu_stream;
struct snd_soc_dai *dai; struct snd_soc_dai *dai;
int i; int i;
...@@ -1648,7 +1647,8 @@ static void dpcm_runtime_setup_be_chan(struct snd_pcm_substream *substream) ...@@ -1648,7 +1647,8 @@ static void dpcm_runtime_setup_be_chan(struct snd_pcm_substream *substream)
* DAIs connected to a single CPU DAI, use CPU DAI's directly * DAIs connected to a single CPU DAI, use CPU DAI's directly
*/ */
if (be->num_codecs == 1) { if (be->num_codecs == 1) {
codec_stream = snd_soc_dai_get_pcm_stream(asoc_rtd_to_codec(be, 0), stream); struct snd_soc_pcm_stream *codec_stream = snd_soc_dai_get_pcm_stream(
asoc_rtd_to_codec(be, 0), stream);
soc_pcm_hw_update_chan(hw, codec_stream); soc_pcm_hw_update_chan(hw, codec_stream);
} }
......
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