summaryrefslogtreecommitdiff
path: root/drivers/media/pci/saa7134/saa7134-input.c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@osg.samsung.com>2015-05-13 17:09:25 (GMT)
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>2015-05-13 17:12:05 (GMT)
commit45f38cb3b80311ade3c87000f7d7a8f6ebd60a43 (patch)
tree002524371b81008a600eaabb17c39e477ba385dd /drivers/media/pci/saa7134/saa7134-input.c
parent2bb3e2eec50c4cc7e0aefc4ef4cc9a1c371038ae (diff)
downloadlinux-45f38cb3b80311ade3c87000f7d7a8f6ebd60a43.tar.xz
[media] saa7134: avoid complex macro warnings
The debug macros are not properly defined, as they generate warnings like: ERROR: Macros with complex values should be enclosed in parentheses +#define core_dbg(fmt, arg...) if (core_debug) \ + printk(KERN_DEBUG pr_fmt("core: " fmt), ## arg) Use do { } while (0) for those macros. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers/media/pci/saa7134/saa7134-input.c')
-rw-r--r--drivers/media/pci/saa7134/saa7134-input.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/media/pci/saa7134/saa7134-input.c b/drivers/media/pci/saa7134/saa7134-input.c
index c603655..e92bcfe 100644
--- a/drivers/media/pci/saa7134/saa7134-input.c
+++ b/drivers/media/pci/saa7134/saa7134-input.c
@@ -41,10 +41,14 @@ static int pinnacle_remote;
module_param(pinnacle_remote, int, 0644); /* Choose Pinnacle PCTV remote */
MODULE_PARM_DESC(pinnacle_remote, "Specify Pinnacle PCTV remote: 0=coloured, 1=grey (defaults to 0)");
-#define input_dbg(fmt, arg...) if (ir_debug) \
- printk(KERN_DEBUG pr_fmt("input: " fmt), ## arg)
-#define ir_dbg(ir, fmt, arg...) if (ir_debug) \
- printk(KERN_DEBUG pr_fmt("ir %s: " fmt), ir->name, ## arg)
+#define input_dbg(fmt, arg...) do { \
+ if (ir_debug) \
+ printk(KERN_DEBUG pr_fmt("input: " fmt), ## arg); \
+ } while (0)
+#define ir_dbg(ir, fmt, arg...) do { \
+ if (ir_debug) \
+ printk(KERN_DEBUG pr_fmt("ir %s: " fmt), ir->name, ## arg); \
+ } while (0)
/* Helper function for raw decoding at GPIO16 or GPIO18 */
static int saa7134_raw_decode_irq(struct saa7134_dev *dev);