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>
#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)
{
}
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)
#endif
#ifndef DDB
-#define DDB(x) {}
+#define DDB(x) do {} while (0)
#endif
#ifndef MDB