Commit 7b259082 authored by Benjamin Herrenschmidt's avatar Benjamin Herrenschmidt Committed by David S. Miller

[PATCH] Fix mdelay's use of 'msec' name

The mdelay() macro does the wrong thing if you try to use it with an
argument expression that contains the (perfectly natural) variable name
'msec'.

Fix it to use an internal variable that doesn't clash with normal
naming.
parent 13deaa5a
......@@ -27,11 +27,11 @@ extern unsigned long loops_per_jiffy;
#ifdef notdef
#define mdelay(n) (\
{unsigned long msec=(n); while (msec--) udelay(1000);})
{unsigned long __ms=(n); while (__ms--) udelay(1000);})
#else
#define mdelay(n) (\
(__builtin_constant_p(n) && (n)<=MAX_UDELAY_MS) ? udelay((n)*1000) : \
({unsigned long msec=(n); while (msec--) udelay(1000);}))
({unsigned long __ms=(n); while (__ms--) udelay(1000);}))
#endif
#ifndef ndelay
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment