mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-06 08:46:46 +00:00
ALSA: usx2y: use for_each_pcm_streams() macro
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Reviewed-by: Takashi Iwai <tiwai@suse.de> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/87sgj9aa8e.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
525c4107da
commit
ffd11d1e7a
1 changed files with 5 additions and 4 deletions
|
@ -906,11 +906,12 @@ static const struct snd_pcm_ops snd_usX2Y_pcm_ops =
|
||||||
*/
|
*/
|
||||||
static void usX2Y_audio_stream_free(struct snd_usX2Y_substream **usX2Y_substream)
|
static void usX2Y_audio_stream_free(struct snd_usX2Y_substream **usX2Y_substream)
|
||||||
{
|
{
|
||||||
kfree(usX2Y_substream[SNDRV_PCM_STREAM_PLAYBACK]);
|
int stream;
|
||||||
usX2Y_substream[SNDRV_PCM_STREAM_PLAYBACK] = NULL;
|
|
||||||
|
|
||||||
kfree(usX2Y_substream[SNDRV_PCM_STREAM_CAPTURE]);
|
for_each_pcm_streams(stream) {
|
||||||
usX2Y_substream[SNDRV_PCM_STREAM_CAPTURE] = NULL;
|
kfree(usX2Y_substream[stream]);
|
||||||
|
usX2Y_substream[stream] = NULL;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void snd_usX2Y_pcm_private_free(struct snd_pcm *pcm)
|
static void snd_usX2Y_pcm_private_free(struct snd_pcm *pcm)
|
||||||
|
|
Loading…
Reference in a new issue