spi: altera: fix return value for altera_spi_txrx()
authorXu Yilun <yilun.xu@intel.com>
Tue, 29 Dec 2020 05:27:41 +0000 (13:27 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 19 Jan 2021 17:27:25 +0000 (18:27 +0100)
commit78755373aa48eb50367bcb674f99fdb79e236bff
tree7e98671f04bd25f51b4c8142cee7b8f161336f28
parent560e9b900e12781706b686e7aa40fb59c9fa5dcb
spi: altera: fix return value for altera_spi_txrx()

[ Upstream commit ede090f5a438e97d0586f64067bbb956e30a2a31 ]

This patch fixes the return value for altera_spi_txrx. It should return
1 for interrupt transfer mode, and return 0 for polling transfer mode.

The altera_spi_txrx() implements the spi_controller.transfer_one
callback. According to the spi-summary.rst, the transfer_one should
return 0 when transfer is finished, return 1 when transfer is still in
progress.

Signed-off-by: Xu Yilun <yilun.xu@intel.com>
Link: https://lore.kernel.org/r/1609219662-27057-2-git-send-email-yilun.xu@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/spi/spi-altera.c