aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/spi/spi.c
diff options
context:
space:
mode:
authorSourav Poddar <sourav.poddar@ti.com>2013-07-18 15:31:25 +0530
committerMark Brown <broonie@linaro.org>2013-07-18 16:22:01 +0100
commit078726ce6d56a767533064e0f2f2100d7cb6fc22 (patch)
treed5b74c5b42ae49a9fcc0eabcc922c6309fe8eb8c /drivers/spi/spi.c
parentad81f0545ef01ea651886dddac4bef6cec930092 (diff)
downloadkernel_goldelico_gta04-078726ce6d56a767533064e0f2f2100d7cb6fc22.zip
kernel_goldelico_gta04-078726ce6d56a767533064e0f2f2100d7cb6fc22.tar.gz
kernel_goldelico_gta04-078726ce6d56a767533064e0f2f2100d7cb6fc22.tar.bz2
driver: spi: Modify core to compute the message length
Make spi core calculate the message length while populating the other transfer parameters. Usecase, driver can use it to populate framelength filed in their controller. Signed-off-by: Sourav Poddar <sourav.poddar@ti.com> Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'drivers/spi/spi.c')
-rw-r--r--drivers/spi/spi.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c
index 978dda2..7e3446c 100644
--- a/drivers/spi/spi.c
+++ b/drivers/spi/spi.c
@@ -1375,6 +1375,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)