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

@@@ -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