ASoC: generic-dmaengine-pcm: Clear slave_config memory
authorLee Jones <lee.jones@linaro.org>
Wed, 6 Nov 2013 10:16:20 +0000 (10:16 +0000)
committerMark Brown <broonie@linaro.org>
Thu, 7 Nov 2013 11:35:30 +0000 (11:35 +0000)
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>
sound/soc/soc-generic-dmaengine-pcm.c

index ee0790337ec97d9eefddd6fc78902e9024e46f37..6ad4c7a47f5da0f3513e9c3c962a4435420fa1f5 100644 (file)
@@ -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