X-Git-Url: http://pilppa.org/gitweb/?a=blobdiff_plain;f=include%2Flinux%2Fdelay.h;h=fd832c6d419efc377a698eecd146032d5f68a8d1;hb=1a781a777b2f6ac46523fe92396215762ced624d;hp=17ddb55430ae19c28704a3da24f230b7a2e2ff6a;hpb=62ed948cb1405fe95d61d8c6445c102e0c9da0a6;p=linux-2.6-omap-h63xx.git diff --git a/include/linux/delay.h b/include/linux/delay.h index 17ddb55430a..fd832c6d419 100644 --- a/include/linux/delay.h +++ b/include/linux/delay.h @@ -7,6 +7,8 @@ * Delay routines, using a pre-computed "loops_per_jiffy" value. */ +#include + extern unsigned long loops_per_jiffy; #include @@ -32,9 +34,14 @@ extern unsigned long loops_per_jiffy; #endif #ifndef ndelay -#define ndelay(x) udelay(((x)+999)/1000) +static inline void ndelay(unsigned long x) +{ + udelay(DIV_ROUND_UP(x, 1000)); +} +#define ndelay(x) ndelay(x) #endif +extern unsigned long lpj_fine; void calibrate_delay(void); void msleep(unsigned int msecs); unsigned long msleep_interruptible(unsigned int msecs);