We can use snd_pcm_is_playback/capture(). Let's use it.
Signed-off-by: Kuninori Morimoto kuninori.morimoto.gx@renesas.com --- sound/xen/xen_snd_front_alsa.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/xen/xen_snd_front_alsa.c b/sound/xen/xen_snd_front_alsa.c index b229eb6f70571..0f4f849bd20b3 100644 --- a/sound/xen/xen_snd_front_alsa.c +++ b/sound/xen/xen_snd_front_alsa.c @@ -240,7 +240,7 @@ stream_get(struct snd_pcm_substream *substream) snd_pcm_substream_chip(substream); struct xen_snd_front_pcm_stream_info *stream;
- if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) + if (snd_pcm_is_playback(substream)) stream = &pcm_instance->streams_pb[substream->number]; else stream = &pcm_instance->streams_cap[substream->number];