summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/spi/spi.c1
-rw-r--r--include/linux/spi/spi.h1
2 files changed, 2 insertions, 0 deletions
diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c
index 8bc7de019e5d..7ed5c147c073 100644
--- a/drivers/spi/spi.c
+++ b/drivers/spi/spi.c
@@ -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) {
diff --git a/include/linux/spi/spi.h b/include/linux/spi/spi.h
index 47854f3813d8..e1b3e69aeddc 100644
--- a/include/linux/spi/spi.h
+++ b/include/linux/spi/spi.h
@@ -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;