diff options
author | Nicholas Mc Guire <hofrat@osadl.org> | 2015-02-05 15:47:06 +0100 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2015-02-05 19:04:57 +0100 |
commit | f2234691d7d7c6154f6d850365cf6cf63cc6eb74 (patch) | |
tree | 8e500a03221f7d7305acd7ff7ba196aecd9d4e24 /drivers/spi/spi-mxs.c | |
parent | Linux 3.19-rc1 (diff) | |
download | linux-f2234691d7d7c6154f6d850365cf6cf63cc6eb74.tar.xz linux-f2234691d7d7c6154f6d850365cf6cf63cc6eb74.zip |
spi: mxs: cleanup wait_for_completion return handling
return type of wait_for_completion_timeout is unsigned long not int, this
patch uses the return value of wait_for_completion_timeout in the condition
directly rather than adding a additional appropriately typed variable.
Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/spi/spi-mxs.c')
-rw-r--r-- | drivers/spi/spi-mxs.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/spi/spi-mxs.c b/drivers/spi/spi-mxs.c index 4045a1e580e1..5b0e9a3e83f6 100644 --- a/drivers/spi/spi-mxs.c +++ b/drivers/spi/spi-mxs.c @@ -282,9 +282,8 @@ static int mxs_spi_txrx_dma(struct mxs_spi *spi, dmaengine_submit(desc); dma_async_issue_pending(ssp->dmach); - ret = wait_for_completion_timeout(&spi->c, - msecs_to_jiffies(SSP_TIMEOUT)); - if (!ret) { + if (!wait_for_completion_timeout(&spi->c, + msecs_to_jiffies(SSP_TIMEOUT))) { dev_err(ssp->dev, "DMA transfer timeout\n"); ret = -ETIMEDOUT; dmaengine_terminate_all(ssp->dmach); |