diff options
author | Mark Brown <broonie@kernel.org> | 2024-05-23 15:16:57 +0100 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2024-05-23 15:16:57 +0100 |
commit | 3aac9f4885922ad0fc01b86f85903768219475a3 (patch) | |
tree | 02493c31ae9cf8c43730b36ef3b25efdfb0cded2 /drivers/spi/spi-pic32-sqi.c | |
parent | a827ad9b3c2fc243e058595533f91ce41a312527 (diff) | |
parent | da560097c05612f8d360f86528f6213629b9c395 (diff) |
soi: Don't call DMA sync API when not needed
Merge series from Andy Shevchenko <andriy.shevchenko@linux.intel.com>:
A couple of fixes to avoid calling DMA sync API when it's not needed.
This doesn't stop from discussing if IOMMU code is doing the right thing,
i.e. dereferences SG list when orig_nents == 0, but this is a separate
story.
Diffstat (limited to 'drivers/spi/spi-pic32-sqi.c')
-rw-r--r-- | drivers/spi/spi-pic32-sqi.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/spi/spi-pic32-sqi.c b/drivers/spi/spi-pic32-sqi.c index 3f1e5b27776b..0031063a7e25 100644 --- a/drivers/spi/spi-pic32-sqi.c +++ b/drivers/spi/spi-pic32-sqi.c @@ -344,7 +344,7 @@ static int pic32_sqi_one_message(struct spi_controller *host, struct spi_transfer *xfer; struct pic32_sqi *sqi; int ret = 0, mode; - unsigned long timeout; + unsigned long time_left; u32 val; sqi = spi_controller_get_devdata(host); @@ -410,8 +410,8 @@ static int pic32_sqi_one_message(struct spi_controller *host, writel(val, sqi->regs + PESQI_BD_CTRL_REG); /* wait for xfer completion */ - timeout = wait_for_completion_timeout(&sqi->xfer_done, 5 * HZ); - if (timeout == 0) { + time_left = wait_for_completion_timeout(&sqi->xfer_done, 5 * HZ); + if (time_left == 0) { dev_err(&sqi->host->dev, "wait timedout/interrupted\n"); ret = -ETIMEDOUT; msg->status = ret; |