提交 462d26b5 编写于 作者: S Sascha Hauer 提交者: Linus Torvalds

spi-imx: update state correctly

Signed-off-by: NSascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: NUwe 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: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 6cdeb002
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册