[ALSA] pcm_native: fix sparse warning about shadowing 'state' symbol
authorMarcin Ślusarz <marcin.slusarz@gmail.com>
Fri, 14 Dec 2007 11:50:16 +0000 (12:50 +0100)
committerJaroslav Kysela <perex@perex.cz>
Thu, 31 Jan 2008 16:29:35 +0000 (17:29 +0100)
pcm_native: fix sparse warning about shadowing 'state' symbol

Signed-off-by: Marcin Ślusarz <marcin.slusarz@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
sound/core/pcm_native.c

index 51294dd3a7a3a7f88b718290d6c1bfd6cc3f75a0..7fb7c921b27d29f7ab3c306f30bc45c52b1c191c 100644 (file)
@@ -1395,10 +1395,10 @@ static int snd_pcm_do_drain_init(struct snd_pcm_substream *substream, int state)
        } else {
                /* stop running stream */
                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;
-                       snd_pcm_do_stop(substream, state);
-                       snd_pcm_post_stop(substream, state);
+                       snd_pcm_do_stop(substream, new_state);
+                       snd_pcm_post_stop(substream, new_state);
                }
        }
        return 0;