spi: s3c64xx: Zero dma_slave_config struct in prepare_dma()

Not all fields of dma_slave_config struct are being initialized by
prepare_dma() function, leaving those which are not in undefined state,
which can confuse DMA drivers using them.

This patch adds call to memset() to zero the struct before initializing
a subset of its fields.

Signed-off-by: Tomasz Figa <tomasz.figa@gmail.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
This commit is contained in:
Tomasz Figa 2013-08-11 02:33:28 +02:00 committed by Mark Brown
parent b998aca8ad
commit b1a8e78d17
1 changed files with 2 additions and 0 deletions

View File

@ -392,6 +392,8 @@ static void prepare_dma(struct s3c64xx_spi_dma_data *dma,
struct scatterlist sg;
struct dma_async_tx_descriptor *desc;
memset(&config, 0, sizeof(config));
if (dma->direction == DMA_DEV_TO_MEM) {
sdd = container_of((void *)dma,
struct s3c64xx_spi_driver_data, rx_dma);