[PATCH v1 1/1] spi: Replace custom fsleep() implementation
From: Andy Shevchenko
Date: Wed Feb 05 2025 - 08:06:37 EST
_spi_transfer_delay_ns() partially reimplements what fsleep() does.
Replace that code by calling fsleep() instead.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>
---
drivers/spi/spi.c | 5 +----
1 file changed, 1 insertion(+), 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);
}
}
--
2.43.0.rc1.1336.g36b5255a03ac