From: Mark Brown Date: Sun, 1 Sep 2013 12:48:58 +0000 (+0100) Subject: Merge remote-tracking branch 'spi/topic/msglen' into spi-next X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=9020b75467ff81b2ae257bbf19acff462854d4ab;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git Merge remote-tracking branch 'spi/topic/msglen' into spi-next --- 9020b75467ff81b2ae257bbf19acff462854d4ab diff --cc drivers/spi/spi.c index 8bc7de019e5d,7e3446cab72f..7ed5c147c073 --- a/drivers/spi/spi.c +++ b/drivers/spi/spi.c @@@ -1380,15 -1375,11 +1380,16 @@@ static int __spi_async(struct spi_devic * it is not set for this transfer. */ list_for_each_entry(xfer, &message->transfers, transfer_list) { + message->frame_length += xfer->len; if (!xfer->bits_per_word) xfer->bits_per_word = spi->bits_per_word; - if (!xfer->speed_hz) + if (!xfer->speed_hz) { xfer->speed_hz = spi->max_speed_hz; + if (master->max_speed_hz && + xfer->speed_hz > master->max_speed_hz) + xfer->speed_hz = master->max_speed_hz; + } + if (master->bits_per_word_mask) { /* Only 32 bits fit in the mask */ if (xfer->bits_per_word > 32)