]> git.baikalelectronics.ru Git - kernel.git/commit
spi: sprd: Fix the error data length in SPI read-only mode
authorLanqing Liu <lanqing.liu@spreadtrum.com>
Tue, 15 Jan 2019 13:46:50 +0000 (21:46 +0800)
committerMark Brown <broonie@kernel.org>
Tue, 15 Jan 2019 14:16:35 +0000 (14:16 +0000)
commit290204f30a3c9ce87d62bece2d1cb4b3644f7f90
treefe58b09195fdfa14ede1adde06dcd4e3af473ba2
parent8f1dc6fcfcd635e19b89c5aebd137468be8be90c
spi: sprd: Fix the error data length in SPI read-only mode

In SPI read-only mode, we will always return the writing length,
which is always the power of "bits_per_word", but the length unit
using by users is byte.

Thus this patch fixes the returning length by getting from
read_bufs() function to get the correct length.

Signed-off-by: Lanqing Liu <lanqing.liu@spreadtrum.com>
Signed-off-by: Baolin Wang <baolin.wang@linaro.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-sprd.c