Commit 37332b5b authored by Boris Brezillon's avatar Boris Brezillon Committed by Ben Hutchings

m68k: Fix ndelay() macro

commit 7e251bb2 upstream.

The current ndelay() macro definition has an extra semi-colon at the
end of the line thus leading to a compilation error when ndelay is used
in a conditional block without curly braces like this one:

	if (cond)
		ndelay(t);
	else
		...

which, after the preprocessor pass gives:

	if (cond)
		m68k_ndelay(t);;
	else
		...

thus leading to the following gcc error:

	error: 'else' without a previous 'if'

Remove this extra semi-colon.
Signed-off-by: default avatarBoris Brezillon <boris.brezillon@free-electrons.com>
Fixes: c8ee038b ("m68k: Implement ndelay() based on the existing udelay() logic")
Signed-off-by: default avatarGeert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
parent e5f9f9b4
...@@ -114,6 +114,6 @@ static inline void __udelay(unsigned long usecs) ...@@ -114,6 +114,6 @@ static inline void __udelay(unsigned long usecs)
*/ */
#define HZSCALE (268435456 / (1000000 / HZ)) #define HZSCALE (268435456 / (1000000 / HZ))
#define ndelay(n) __delay(DIV_ROUND_UP((n) * ((((HZSCALE) >> 11) * (loops_per_jiffy >> 11)) >> 6), 1000)); #define ndelay(n) __delay(DIV_ROUND_UP((n) * ((((HZSCALE) >> 11) * (loops_per_jiffy >> 11)) >> 6), 1000))
#endif /* defined(_M68K_DELAY_H) */ #endif /* defined(_M68K_DELAY_H) */
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