From 0ddd7f10825a80ca6f3af00579f18d75b1a9c10d Mon Sep 17 00:00:00 2001 From: Lars-Peter Clausen Date: Mon, 22 Mar 2010 18:57:50 +0000 Subject: sound jz4740_pcm: Set dma channel to NULL after it has been freed, because hw_free can be called multiple times aswell. SVN-Revision: 20373 --- target/linux/xburst/files-2.6.32/sound/soc/jz4740/jz4740-pcm.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'target/linux/xburst/files-2.6.32/sound') diff --git a/target/linux/xburst/files-2.6.32/sound/soc/jz4740/jz4740-pcm.c b/target/linux/xburst/files-2.6.32/sound/soc/jz4740/jz4740-pcm.c index 4a4de195a8..3ccc652a0b 100644 --- a/target/linux/xburst/files-2.6.32/sound/soc/jz4740/jz4740-pcm.c +++ b/target/linux/xburst/files-2.6.32/sound/soc/jz4740/jz4740-pcm.c @@ -136,8 +136,10 @@ static int jz4740_pcm_hw_free(struct snd_pcm_substream *substream) struct jz4740_runtime_data *prtd = substream->runtime->private_data; snd_pcm_set_runtime_buffer(substream, NULL); - if (prtd->dma) + if (prtd->dma) { jz4740_dma_free(prtd->dma); + prtd->dma = NULL; + } return 0; } -- cgit v1.2.3