Merge remote-tracking branch 'spi/topic/msglen' into spi-next
authorMark Brown <broonie@linaro.org>
Sun, 1 Sep 2013 12:48:58 +0000 (13:48 +0100)
committerMark Brown <broonie@linaro.org>
Sun, 1 Sep 2013 12:48:58 +0000 (13:48 +0100)
1  2 
drivers/spi/spi.c
include/linux/spi/spi.h

index 8bc7de019e5daeb87a11f4b61a16abcd4bbf5ec0,7e3446cab72fab90bc1566866bccf2e35dd9685b..7ed5c147c073c7c7fbcbfef1fb15529727999598
@@@ -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)
Simple merge