Commit b05e5787 authored by Marcin Ślusarz's avatar Marcin Ślusarz Committed by Jaroslav Kysela

[ALSA] pcm_native: fix sparse warning about shadowing 'state' symbol

pcm_native: fix sparse warning about shadowing 'state' symbol
Signed-off-by: default avatarMarcin Ślusarz <marcin.slusarz@gmail.com>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
Signed-off-by: default avatarJaroslav Kysela <perex@perex.cz>
parent cd0b4ac8
...@@ -1395,10 +1395,10 @@ static int snd_pcm_do_drain_init(struct snd_pcm_substream *substream, int state) ...@@ -1395,10 +1395,10 @@ static int snd_pcm_do_drain_init(struct snd_pcm_substream *substream, int state)
} else { } else {
/* stop running stream */ /* stop running stream */
if (runtime->status->state == SNDRV_PCM_STATE_RUNNING) { if (runtime->status->state == SNDRV_PCM_STATE_RUNNING) {
int state = snd_pcm_capture_avail(runtime) > 0 ? int new_state = snd_pcm_capture_avail(runtime) > 0 ?
SNDRV_PCM_STATE_DRAINING : SNDRV_PCM_STATE_SETUP; SNDRV_PCM_STATE_DRAINING : SNDRV_PCM_STATE_SETUP;
snd_pcm_do_stop(substream, state); snd_pcm_do_stop(substream, new_state);
snd_pcm_post_stop(substream, state); snd_pcm_post_stop(substream, new_state);
} }
} }
return 0; return 0;
......
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