diff options
-rw-r--r-- | drivers/spi/au1550_spi.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/spi/au1550_spi.c b/drivers/spi/au1550_spi.c index 76cbc1a66598..cfd5ff9508fa 100644 --- a/drivers/spi/au1550_spi.c +++ b/drivers/spi/au1550_spi.c | |||
@@ -237,8 +237,14 @@ static int au1550_spi_setupxfer(struct spi_device *spi, struct spi_transfer *t) | |||
237 | unsigned bpw, hz; | 237 | unsigned bpw, hz; |
238 | u32 cfg, stat; | 238 | u32 cfg, stat; |
239 | 239 | ||
240 | bpw = t ? t->bits_per_word : spi->bits_per_word; | 240 | bpw = spi->bits_per_word; |
241 | hz = t ? t->speed_hz : spi->max_speed_hz; | 241 | hz = spi->max_speed_hz; |
242 | if (t) { | ||
243 | if (t->bits_per_word) | ||
244 | bpw = t->bits_per_word; | ||
245 | if (t->speed_hz) | ||
246 | hz = t->speed_hz; | ||
247 | } | ||
242 | 248 | ||
243 | if (bpw < 4 || bpw > 24) { | 249 | if (bpw < 4 || bpw > 24) { |
244 | dev_err(&spi->dev, "setupxfer: invalid bits_per_word=%d\n", | 250 | dev_err(&spi->dev, "setupxfer: invalid bits_per_word=%d\n", |