summaryrefslogtreecommitdiff
path: root/include/media
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2011-08-22 02:56:45 +0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2011-09-04 03:56:22 +0400
commit86b0dbef777a1fbb9922e304f047921d4e9d9c40 (patch)
tree1896914d75102dc7c067bb419f6076835978ede9 /include/media
parent44d0b80e5ff741d502a6ccc8685a18bda1ac9da4 (diff)
downloadlinux-86b0dbef777a1fbb9922e304f047921d4e9d9c40.tar.xz
[media] rc-core.h: Surround macro with do {} while (0)
Macros coded with if statements should be do { if... } while (0) so the macros can be used in other if tests. Use ##__VA_ARGS__ for variadic macro as well. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'include/media')
-rw-r--r--include/media/rc-core.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/include/media/rc-core.h b/include/media/rc-core.h
index b1f19b77ecd4..b0c494a69079 100644
--- a/include/media/rc-core.h
+++ b/include/media/rc-core.h
@@ -23,8 +23,11 @@
#include <media/rc-map.h>
extern int rc_core_debug;
-#define IR_dprintk(level, fmt, arg...) if (rc_core_debug >= level) \
- printk(KERN_DEBUG "%s: " fmt , __func__, ## arg)
+#define IR_dprintk(level, fmt, ...) \
+do { \
+ if (rc_core_debug >= level) \
+ pr_debug("%s: " fmt, __func__, ##__VA_ARGS__); \
+} while (0)
enum rc_driver_type {
RC_DRIVER_SCANCODE = 0, /* Driver or hardware generates a scancode */