Commit 7c35ae8c authored by Dave Jones's avatar Dave Jones Committed by Dave Jones

[PATCH] guard mad16 debug macro.

Still pretty ugly debug macro, but this at least
makes it do the right thing when used in if/else blocks

Fix from Joe Perches <joe@perches.com>
parent a3047ac8
......@@ -99,7 +99,7 @@ static int debug = 0; /* debugging output */
#ifdef DDB
#undef DDB
#endif
#define DDB(x) {if (debug) x;}
#define DDB(x) do {if (debug) x;} while (0)
static unsigned char mad_read(int port)
{
......@@ -278,7 +278,8 @@ static int __init detect_mad16(void)
}
for (i = 0xf8d; i <= 0xf98; i++)
if (!c924pnp)
DDB(printk("Port %0x (init value) = %0x\n", i, mad_read(i))) else
DDB(printk("Port %0x (init value) = %0x\n", i, mad_read(i)));
else
DDB(printk("Port %0x (init value) = %0x\n", i-0x80, mad_read(i)));
if (board_type == C930)
......
......@@ -137,7 +137,7 @@ static inline int translate_mode(struct file *file)
#endif
#ifndef DDB
#define DDB(x) {}
#define DDB(x) do {} while (0)
#endif
#ifndef MDB
......
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