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)
committerMark Brown <broonie@kernel.org>
Tue, 29 Dec 2020 13:18:09 +0000 (13:18 +0000)
commitede090f5a438e97d0586f64067bbb956e30a2a31
tree9722fd456a268a15b3fbe1f4591174a7076d3259
parent8db90aa36063f471bea1e65e23185913043852dc
spi: altera: fix return value for altera_spi_txrx()

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>
drivers/spi/spi-altera.c