]> git.baikalelectronics.ru Git - kernel.git/commit
spi/sirf: fix the misunderstanding about len of spi_transfer
authorQipan Li <Qipan.Li@csr.com>
Sun, 25 Aug 2013 13:42:50 +0000 (21:42 +0800)
committerMark Brown <broonie@linaro.org>
Mon, 26 Aug 2013 12:00:14 +0000 (13:00 +0100)
commit6192f5d0b4a137cc0aa6b549592ce74c667e74a5
tree34e0abbfe07112687885f2097fa893fc7f3b7b12
parent71bed81de75ecfca214e16b46c89bda3fbf26376
spi/sirf: fix the misunderstanding about len of spi_transfer

the unit of len of spi_transfer is in bytes, not in spi words. the
old codes misunderstood that and thought the len is the amount of
spi words. but it is actually how many bytes existing in the spi
buffer.

this patch fixes that and also rename left_tx_cnt and left_rx_cnt
to left_tx_word and left_rx_word to highlight they are in words.

Signed-off-by: Qipan Li <Qipan.Li@csr.com>
Signed-off-by: Barry Song <Baohua.Song@csr.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
drivers/spi/spi-sirf.c