summaryrefslogtreecommitdiff
path: root/target/linux/xburst/files-2.6.32
diff options
context:
space:
mode:
authorLars-Peter Clausen <lars@metafoo.de>2010-03-22 18:57:50 +0000
committerLars-Peter Clausen <lars@metafoo.de>2010-03-22 18:57:50 +0000
commit0ddd7f10825a80ca6f3af00579f18d75b1a9c10d (patch)
tree0e4ab46fe310ed55691932dfa49330b38b7382c8 /target/linux/xburst/files-2.6.32
parentfd3344d4881b33c108bccc22a3eb8623adcb8008 (diff)
downloadmtk-20170518-0ddd7f10825a80ca6f3af00579f18d75b1a9c10d.zip
mtk-20170518-0ddd7f10825a80ca6f3af00579f18d75b1a9c10d.tar.gz
mtk-20170518-0ddd7f10825a80ca6f3af00579f18d75b1a9c10d.tar.bz2
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
Diffstat (limited to 'target/linux/xburst/files-2.6.32')
-rw-r--r--target/linux/xburst/files-2.6.32/sound/soc/jz4740/jz4740-pcm.c4
1 files changed, 3 insertions, 1 deletions
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 4a4de19..3ccc652 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;
}