[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1254339814-21506-2-git-send-email-u.kleine-koenig@pengutronix.de>
Date: Wed, 30 Sep 2009 21:43:29 +0200
From: Uwe Kleine-König
<u.kleine-koenig@...gutronix.de>
To: spi-devel-general@...ts.sourceforge.net
Cc: linux-kernel@...r.kernel.org,
Sascha Hauer <s.hauer@...gutronix.de>,
David Brownell <dbrownell@...rs.sourceforge.net>,
Andrew Morton <akpm@...ux-foundation.org>,
Guennadi Liakhovetski <g.liakhovetski@....de>
Subject: [PATCH 2/7] spi-imx: update state correctly
From: Sascha Hauer <s.hauer@...gutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@...gutronix.de>
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@...gutronix.de>
Cc: David Brownell <dbrownell@...rs.sourceforge.net>
Cc: Andrew Morton <akpm@...ux-foundation.org>
Cc: Guennadi Liakhovetski <g.liakhovetski@....de>
---
drivers/spi/spi_imx.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/drivers/spi/spi_imx.c b/drivers/spi/spi_imx.c
index b1f530f..a8f9bff 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;
--
1.6.4.3
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists