Home Home > GIT Browse
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Jones <davej@codemonkey.org.uk>2003-03-23 20:51:33 -0800
committerDave Jones <davej@tetrachloride.(none)>2003-03-23 20:51:33 -0800
commit7c35ae8c0a5953dcbc4b188615d19fe3a60efce3 (patch)
treeb4d9ad5af4559360089bfbc801431a204fa03457
parenta3047ac8f0f8611372efa232dd4af5896a73868c (diff)
[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>
-rw-r--r--sound/oss/mad16.c5
-rw-r--r--sound/oss/sound_config.h2
2 files changed, 4 insertions, 3 deletions
diff --git a/sound/oss/mad16.c b/sound/oss/mad16.c
index 8e3f124dea4f..32e636b6a8bc 100644
--- a/sound/oss/mad16.c
+++ b/sound/oss/mad16.c
@@ -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)
diff --git a/sound/oss/sound_config.h b/sound/oss/sound_config.h
index 4838b589cf6e..9f912b8a2969 100644
--- a/sound/oss/sound_config.h
+++ b/sound/oss/sound_config.h
@@ -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