diff options
author | Nicholas Mc Guire <hofrat@osadl.org> | 2015-02-05 09:47:06 -0500 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2015-02-05 18:04:57 +0000 |
commit | f2234691d7d7c6154f6d850365cf6cf63cc6eb74 (patch) | |
tree | 8e500a03221f7d7305acd7ff7ba196aecd9d4e24 /drivers | |
parent | 97bf6af1f928216fd6c5a66e8a57bfa95a659672 (diff) |
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')
-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); |