diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/spi/spi.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c index 08ff4acd5225..2edbe1903804 100644 --- a/drivers/spi/spi.c +++ b/drivers/spi/spi.c | |||
@@ -1369,12 +1369,14 @@ static int __spi_async(struct spi_device *spi, struct spi_message *message) | |||
1369 | } | 1369 | } |
1370 | 1370 | ||
1371 | /** | 1371 | /** |
1372 | * Set transfer bits_per_word as spi device default if it is not | 1372 | * Set transfer bits_per_word and max speed as spi device default if |
1373 | * set for this transfer. | 1373 | * it is not set for this transfer. |
1374 | */ | 1374 | */ |
1375 | list_for_each_entry(xfer, &message->transfers, transfer_list) { | 1375 | list_for_each_entry(xfer, &message->transfers, transfer_list) { |
1376 | if (!xfer->bits_per_word) | 1376 | if (!xfer->bits_per_word) |
1377 | xfer->bits_per_word = spi->bits_per_word; | 1377 | xfer->bits_per_word = spi->bits_per_word; |
1378 | if (!xfer->speed_hz) | ||
1379 | xfer->speed_hz = spi->max_speed_hz; | ||
1378 | } | 1380 | } |
1379 | 1381 | ||
1380 | message->spi = spi; | 1382 | message->spi = spi; |