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>
This commit is contained in:
committed by
Mark Brown
parent
ad81f0545e
commit
078726ce6d
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user