V4L/DVB: cx18: cleanup cx18-alsa debug logging
authorDevin Heitmueller <dheitmueller@kernellabs.com>
Fri, 20 Nov 2009 04:24:57 +0000 (01:24 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Fri, 26 Feb 2010 18:10:43 +0000 (15:10 -0300)
Fix the debug macro so that it is dependent on the modprobe parameter.

This work was sponsored by ONELAN Limited.

Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/video/cx18/cx18-alsa-main.c

index 6433ff0ad859e8507e9b9979ac30d87f081cbe77..9b652a1649c8ba2b08ddc636a1235bbe48b0309e 100644 (file)
 
 int cx18_alsa_debug;
 
-#define CX18_DEBUG_ALSA_INFO(fmt, arg...) printk(KERN_INFO "%s: " fmt, "cx18-alsa", ## arg)
+#define CX18_DEBUG_ALSA_INFO(fmt, arg...) \
+       do { \
+               if (cx18_alsa_debug & 2) \
+                       printk(KERN_INFO "%s: " fmt, "cx18-alsa", ## arg); \
+       } while (0);
 
 module_param_named(debug, cx18_alsa_debug, int, 0644);
 MODULE_PARM_DESC(debug,