summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2009-10-01 15:44:29 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2009-10-01 16:11:16 -0700
commit462d26b5d2f17b6258f33c4d1e3310089b006489 (patch)
tree57fcb0f0f9a0cde918127d2b62fe799d55b27d05
parent6cdeb00218b0d0eaf1329d1e6a0959ee3f0fa14c (diff)
spi-imx: update state correctly
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Cc: David Brownell <dbrownell@users.sourceforge.net> Cc: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r--drivers/spi/spi_imx.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/spi/spi_imx.c b/drivers/spi/spi_imx.c
index b1f530fd6bdc..a8f9bff529e5 100644
--- a/drivers/spi/spi_imx.c
+++ b/drivers/spi/spi_imx.c
@@ -443,6 +443,13 @@ static int spi_imx_setupxfer(struct spi_device *spi,
config.speed_hz = t ? t->speed_hz : spi->max_speed_hz;
config.mode = spi->mode;
+ if (!config.speed_hz)
+ config.speed_hz = spi->max_speed_hz;
+ if (!config.bpw)
+ config.bpw = spi->bits_per_word;
+ if (!config.speed_hz)
+ config.speed_hz = spi->max_speed_hz;
+
spi_imx->config(spi_imx, &config);
return 0;