summaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorLee Jones <lee.jones@linaro.org>2013-11-06 10:16:20 +0000
committerMark Brown <broonie@linaro.org>2013-11-07 11:35:30 +0000
commita894bd7fb539d671149fea9420c94c0fbe6baf7a (patch)
treeedbcbcb3ee64c955dc417352db4fea1342234cbc /sound
parentf82bf8e2c8be73ebd719807bf054721930371174 (diff)
downloadop-kernel-dev-a894bd7fb539d671149fea9420c94c0fbe6baf7a.zip
op-kernel-dev-a894bd7fb539d671149fea9420c94c0fbe6baf7a.tar.gz
ASoC: generic-dmaengine-pcm: Clear slave_config memory
We currently assume that the DMA Slave Config will be fully populated by the platform, however some DMA Engines make decisions based on zero (default) flags such as DMA_SLAVE_BUSWIDTH_UNDEFINED and as this is a static declaration we need to memset it to clear the data area. Signed-off-by: Lee Jones <lee.jones@linaro.org> Acked-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/soc-generic-dmaengine-pcm.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sound/soc/soc-generic-dmaengine-pcm.c b/sound/soc/soc-generic-dmaengine-pcm.c
index ee07903..6ad4c7a 100644
--- a/sound/soc/soc-generic-dmaengine-pcm.c
+++ b/sound/soc/soc-generic-dmaengine-pcm.c
@@ -90,6 +90,8 @@ static int dmaengine_pcm_hw_params(struct snd_pcm_substream *substream,
struct dma_slave_config slave_config;
int ret;
+ memset(&slave_config, 0, sizeof(slave_config));
+
if (!pcm->config)
prepare_slave_config = snd_dmaengine_pcm_prepare_slave_config;
else
OpenPOWER on IntegriCloud