From d1c627b59c8e69d40b94a4ff28a582a84c6a95a3 Mon Sep 17 00:00:00 2001 From: Uwe Kleine-König Date: Thu, 1 Oct 2009 15:44:32 -0700 Subject: spi-imx: initialize complete config struct MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Otherwise the config function uses random data from the stack. This didn't stick out because config is called once more in the chipselect function with correct parameters. Signed-off-by: Uwe Kleine-König Acked-by: Sascha Hauer Cc: David Brownell Cc: Guennadi Liakhovetski Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/spi/spi_imx.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/spi/spi_imx.c b/drivers/spi/spi_imx.c index b6a8149220fb..2fec1170b6c0 100644 --- a/drivers/spi/spi_imx.c +++ b/drivers/spi/spi_imx.c @@ -442,6 +442,7 @@ static int spi_imx_setupxfer(struct spi_device *spi, config.bpw = t ? t->bits_per_word : spi->bits_per_word; config.speed_hz = t ? t->speed_hz : spi->max_speed_hz; config.mode = spi->mode; + config.cs = spi_imx->chipselect[spi->chip_select]; if (!config.speed_hz) config.speed_hz = spi->max_speed_hz; -- cgit v1.2.3