spi: rockchip: Fix error in SPI slave pio read
authorJon Lin <jon.lin@rock-chips.com>
Thu, 23 Jul 2020 00:43:56 +0000 (08:43 +0800)
committerMark Brown <broonie@kernel.org>
Tue, 28 Jul 2020 16:29:31 +0000 (17:29 +0100)
commit4294e4accf8d695ea5605f6b189008b692e3e82c
tree23d9e35d64c40b52838f2cbfaec2d2a945fdecbf
parent13a96935e6f66bafb6da92791120546a4bf20889
spi: rockchip: Fix error in SPI slave pio read

The RXFLR is possible larger than rx_left in Rockchip SPI, fix it.

Fixes: 01b59ce5dac8 ("spi: rockchip: use irq rather than polling")
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
Tested-by: Emil Renner Berthing <kernel@esmil.dk>
Reviewed-by: Heiko Stuebner <heiko@sntech.de>
Reviewed-by: Emil Renner Berthing <kernel@esmil.dk>
Link: https://lore.kernel.org/r/20200723004356.6390-3-jon.lin@rock-chips.com
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-rockchip.c