aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/delay.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/delay.h')
-rw-r--r--include/linux/delay.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/include/linux/delay.h b/include/linux/delay.h
index 17ddb55430ae..54552d21296e 100644
--- a/include/linux/delay.h
+++ b/include/linux/delay.h
@@ -7,6 +7,8 @@
7 * Delay routines, using a pre-computed "loops_per_jiffy" value. 7 * Delay routines, using a pre-computed "loops_per_jiffy" value.
8 */ 8 */
9 9
10#include <linux/kernel.h>
11
10extern unsigned long loops_per_jiffy; 12extern unsigned long loops_per_jiffy;
11 13
12#include <asm/delay.h> 14#include <asm/delay.h>
@@ -32,7 +34,11 @@ extern unsigned long loops_per_jiffy;
32#endif 34#endif
33 35
34#ifndef ndelay 36#ifndef ndelay
35#define ndelay(x) udelay(((x)+999)/1000) 37static inline void ndelay(unsigned long x)
38{
39 udelay(DIV_ROUND_UP(x, 1000));
40}
41#define ndelay(x) ndelay(x)
36#endif 42#endif
37 43
38void calibrate_delay(void); 44void calibrate_delay(void);