[PATCH v1 1/1] spi: Replace custom fsleep() implementation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



_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





[Index of Archives]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux