Commit 14de3918 authored by Gao Pan's avatar Gao Pan Committed by Mark Brown

spi: imx: replace schedule() with cond_resched()

It's more rational that just do the schedule when necessary
other than do it every time. Thus, it's better to replace
schedule() with cond_resched() in fsl_lpspi_txfifo_empty(),
which contributes to saving cpu time.
Signed-off-by: default avatarGao Pan <pandy.gao@nxp.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent e3a49390
......@@ -176,7 +176,7 @@ static int fsl_lpspi_txfifo_empty(struct fsl_lpspi_data *fsl_lpspi)
dev_dbg(fsl_lpspi->dev, "txfifo empty timeout\n");
return -ETIMEDOUT;
}
schedule();
cond_resched();
} while (txcnt);
......
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