diff options
author | Hiromitsu Yamasaki <hiromitsu.yamasaki.ym@renesas.com> | 2017-11-02 05:32:36 -0400 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2017-11-02 07:25:44 -0400 |
commit | 36735783fdb599c94b9c86824583df367c65900b (patch) | |
tree | e496e1d75f1aadf8d01bff1d4ac36626060f1eab | |
parent | 2bd6bf03f4c1c59381d62c61d03f6cc3fe71f66e (diff) |
spi: sh-msiof: Fix DMA transfer size check
DMA supports 32-bit words only,
even if BITLEN1 of SITMDR2 register is 16bit.
Fixes: b0d0ce8b6b91 ("spi: sh-msiof: Add DMA support")
Signed-off-by: Hiromitsu Yamasaki <hiromitsu.yamasaki.ym@renesas.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Acked-by: Geert Uytterhoeven <geert+renesas@glider.be>
Acked-by: Dirk Behme <dirk.behme@de.bosch.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r-- | drivers/spi/spi-sh-msiof.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/spi/spi-sh-msiof.c b/drivers/spi/spi-sh-msiof.c index 0eb1e9583485..837bb95eea62 100644 --- a/drivers/spi/spi-sh-msiof.c +++ b/drivers/spi/spi-sh-msiof.c | |||
@@ -900,7 +900,7 @@ static int sh_msiof_transfer_one(struct spi_master *master, | |||
900 | break; | 900 | break; |
901 | copy32 = copy_bswap32; | 901 | copy32 = copy_bswap32; |
902 | } else if (bits <= 16) { | 902 | } else if (bits <= 16) { |
903 | if (l & 1) | 903 | if (l & 3) |
904 | break; | 904 | break; |
905 | copy32 = copy_wswap32; | 905 | copy32 = copy_wswap32; |
906 | } else { | 906 | } else { |