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>
This commit is contained in:
parent
6cdeb00218
commit
462d26b5d2
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue