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 <u.kleine-koe...@pengutronix.de>
Acked-by: Sascha Hauer <s.ha...@pengutronix.de>
Cc: David Brownell <dbrown...@users.sourceforge.net>
Cc: Andrew Morton <a...@linux-foundation.org>
Cc: Guennadi Liakhovetski <g.liakhovet...@gmx.de>
---
 drivers/spi/spi_imx.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/spi/spi_imx.c b/drivers/spi/spi_imx.c
index b6a8149..2fec117 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;
-- 
1.6.4.3


------------------------------------------------------------------------------
Come build with us! The BlackBerry&reg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9&#45;12, 2009. Register now&#33;
http://p.sf.net/sfu/devconf
_______________________________________________
spi-devel-general mailing list
spi-devel-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/spi-devel-general

Reply via email to