diff options
author | Qipan Li <Qipan.Li@csr.com> | 2014-09-02 05:01:04 -0400 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2014-09-04 18:35:58 -0400 |
commit | 0021d97334d207169d2935489b8be11dc52c54a8 (patch) | |
tree | c636d2a82db70e6ae8fcef9c8bfd4e3f71663cfe /drivers/spi/spi-sirf.c | |
parent | 7850cdfc8028cc7d522c032f64c62c1c01e85875 (diff) |
spi: sirf: fix 'cmd_transfer' function typos
unify 'cmd_transfer' like 'pio_transfer' and 'dma_transfer' as void
function, and also change left_rx_word according to transfer result.
Signed-off-by: Qipan Li <Qipan.Li@csr.com>
Signed-off-by: Barry Song <Baohua.Song@csr.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/spi/spi-sirf.c')
-rw-r--r-- | drivers/spi/spi-sirf.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/spi/spi-sirf.c b/drivers/spi/spi-sirf.c index 44ec3bbbf5a4..d6308e6a9b47 100644 --- a/drivers/spi/spi-sirf.c +++ b/drivers/spi/spi-sirf.c | |||
@@ -303,7 +303,7 @@ static void spi_sirfsoc_dma_fini_callback(void *data) | |||
303 | complete(dma_complete); | 303 | complete(dma_complete); |
304 | } | 304 | } |
305 | 305 | ||
306 | static int spi_sirfsoc_cmd_transfer(struct spi_device *spi, | 306 | static void spi_sirfsoc_cmd_transfer(struct spi_device *spi, |
307 | struct spi_transfer *t) | 307 | struct spi_transfer *t) |
308 | { | 308 | { |
309 | struct sirfsoc_spi *sspi; | 309 | struct sirfsoc_spi *sspi; |
@@ -325,10 +325,9 @@ static int spi_sirfsoc_cmd_transfer(struct spi_device *spi, | |||
325 | sspi->base + SIRFSOC_SPI_TX_RX_EN); | 325 | sspi->base + SIRFSOC_SPI_TX_RX_EN); |
326 | if (wait_for_completion_timeout(&sspi->tx_done, timeout) == 0) { | 326 | if (wait_for_completion_timeout(&sspi->tx_done, timeout) == 0) { |
327 | dev_err(&spi->dev, "cmd transfer timeout\n"); | 327 | dev_err(&spi->dev, "cmd transfer timeout\n"); |
328 | return 0; | 328 | return; |
329 | } | 329 | } |
330 | 330 | sspi->left_rx_word -= t->len; | |
331 | return t->len; | ||
332 | } | 331 | } |
333 | 332 | ||
334 | static void spi_sirfsoc_dma_transfer(struct spi_device *spi, | 333 | static void spi_sirfsoc_dma_transfer(struct spi_device *spi, |