diff options
author | Peter Shih <pihsun@chromium.org> | 2018-09-10 11:54:21 +0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-11-20 18:46:55 +0100 |
commit | 6237e9d0715a669b25a0d9466a6bc99f2129fea4 (patch) | |
tree | bcd56e4e7294e54a5a3a62b1501930dc2eaa813f /sound | |
parent | 779c96ef3fac4d2aa50c1554bf7a4af1f3d63f48 (diff) | |
download | linux-stable-6237e9d0715a669b25a0d9466a6bc99f2129fea4.tar.gz linux-stable-6237e9d0715a669b25a0d9466a6bc99f2129fea4.tar.bz2 linux-stable-6237e9d0715a669b25a0d9466a6bc99f2129fea4.zip |
spi: mediatek: Don't modify spi_transfer when transfer.
[ Upstream commit 00bca73bfca4fb0ab089b94cad0fc83d8b49c25f ]
Mediatek SPI driver modifies some fields (tx_buf, rx_buf, len, tx_dma,
rx_dma) of the spi_transfer* passed in when doing transfer_one and in
interrupt handler. This is somewhat unexpected, and there are some
caller (e.g. Cr50 spi driver) that reuse the spi_transfer for multiple
messages. Add a field to record how many bytes have been transferred,
and calculate the right len / buffer based on it instead.
Signed-off-by: Pi-Hsun Shih <pihsun@chromium.org>
Change-Id: I23e218cd964f16c0b2b26127d4a5ca6529867673
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'sound')
0 files changed, 0 insertions, 0 deletions