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)
drivers/spi/spi.c
include/linux/spi/spi.h

index 8bc7de0..7ed5c14 100644 (file)
@@ -1380,6 +1380,7 @@ static int __spi_async(struct spi_device *spi, struct spi_message *message)
         * 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) {
index 47854f3..e1b3e69 100644 (file)
@@ -584,6 +584,7 @@ struct spi_message {
        /* completion is reported through a callback */
        void                    (*complete)(void *context);
        void                    *context;
+       unsigned                frame_length;
        unsigned                actual_length;
        int                     status;