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 13:04:57 -0500 |
commit | f2234691d7d7c6154f6d850365cf6cf63cc6eb74 (patch) | |
tree | 8e500a03221f7d7305acd7ff7ba196aecd9d4e24 | |
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>
-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, | |||
282 | dmaengine_submit(desc); | 282 | dmaengine_submit(desc); |
283 | dma_async_issue_pending(ssp->dmach); | 283 | dma_async_issue_pending(ssp->dmach); |
284 | 284 | ||
285 | ret = wait_for_completion_timeout(&spi->c, | 285 | if (!wait_for_completion_timeout(&spi->c, |
286 | msecs_to_jiffies(SSP_TIMEOUT)); | 286 | msecs_to_jiffies(SSP_TIMEOUT))) { |
287 | if (!ret) { | ||
288 | dev_err(ssp->dev, "DMA transfer timeout\n"); | 287 | dev_err(ssp->dev, "DMA transfer timeout\n"); |
289 | ret = -ETIMEDOUT; | 288 | ret = -ETIMEDOUT; |
290 | dmaengine_terminate_all(ssp->dmach); | 289 | dmaengine_terminate_all(ssp->dmach); |