Commit f2234691 authored by Nicholas Mc Guire's avatar Nicholas Mc Guire Committed by Mark Brown

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: default avatarNicholas Mc Guire <hofrat@osadl.org>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 97bf6af1
...@@ -282,9 +282,8 @@ static int mxs_spi_txrx_dma(struct mxs_spi *spi, ...@@ -282,9 +282,8 @@ static int mxs_spi_txrx_dma(struct mxs_spi *spi,
dmaengine_submit(desc); dmaengine_submit(desc);
dma_async_issue_pending(ssp->dmach); dma_async_issue_pending(ssp->dmach);
ret = wait_for_completion_timeout(&spi->c, if (!wait_for_completion_timeout(&spi->c,
msecs_to_jiffies(SSP_TIMEOUT)); msecs_to_jiffies(SSP_TIMEOUT))) {
if (!ret) {
dev_err(ssp->dev, "DMA transfer timeout\n"); dev_err(ssp->dev, "DMA transfer timeout\n");
ret = -ETIMEDOUT; ret = -ETIMEDOUT;
dmaengine_terminate_all(ssp->dmach); dmaengine_terminate_all(ssp->dmach);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment