diff options
author | 2025-02-05 15:06:24 +0200 | |
---|---|---|
committer | 2025-02-05 13:53:10 +0000 | |
commit | 215705db51eb23052c73126d2efb6acbc2db0424 (patch) | |
tree | 5b1897ff6f3b569565494c1f1f6178540ae7283d | |
parent | spi: fsi: Batch TX operations (diff) | |
download | wireguard-linux-215705db51eb23052c73126d2efb6acbc2db0424.tar.xz wireguard-linux-215705db51eb23052c73126d2efb6acbc2db0424.zip |
spi: Replace custom fsleep() implementation
_spi_transfer_delay_ns() partially reimplements what fsleep() does.
Replace that code by calling fsleep() instead.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://patch.msgid.link/20250205130624.716039-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r-- | drivers/spi/spi.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c index a7a4647717d4..68e675877168 100644 --- a/drivers/spi/spi.c +++ b/drivers/spi/spi.c @@ -1495,10 +1495,7 @@ static void _spi_transfer_delay_ns(u32 ns) } else { u32 us = DIV_ROUND_UP(ns, NSEC_PER_USEC); - if (us <= 10) - udelay(us); - else - usleep_range(us, us + DIV_ROUND_UP(us, 10)); + fsleep(us); } } |