[PATCH v2 34/48] clock: Use udelay() to implement mdelay()

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

 



Signed-off-by: Andrey Smirnov <andrew.smirnov@xxxxxxxxx>
---
 include/clock.h | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/include/clock.h b/include/clock.h
index 38b335c2c..8e40451a3 100644
--- a/include/clock.h
+++ b/include/clock.h
@@ -86,9 +86,7 @@ static inline void udelay(unsigned long usecs)
 
 static inline void mdelay(unsigned long msecs)
 {
-	uint64_t start = get_time_ns();
-
-	while(!is_timeout(start, msecs * MSECOND));
+	udelay(msecs * MSECOND / USECOND);
 }
 
 static inline void mdelay_non_interruptible(unsigned long msecs)
-- 
2.17.0


_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux