What is the semantic difference between mdelay and udelay? I mean, why
don't you just change the implementation of udelay to handle longer
delays using __builtin_constant_p et al? Having both mdelay and udelay
is confusing.
if you redefine the current udelay to __native_udelay for example, then
instead of doing
+#define mdelay(n) (\
+ (__builtin_constant_p(n) && (n)<=MAX_UDELAY_MS) ? udelay((n)*1000) : \
+ ({unsigned long msec=(n); while (msec--) udelay(1000);}))
you could do roughly
#define udelay(n) do { \
if (__builtin_constant_p(n) && (n)<=MAX_UDELAY_MS*1000) \
__native_udelay(n); \
else { \
unsigned long msec=(n)/1000; \
while (msec--) \
__native_udelay(1000); \
__native_udelay((n)%1000); \
} \
} while (0)
and we wouldn't have two separate functions.
astor
-- Alexander Kjeldaas, Guardian Networks AS, Trondheim, Norway http://www.guardian.no/- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu