From 226be058196bbfbc92885348ce686c42c012fab5 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Sat, 27 Oct 2012 15:25:02 -0300 Subject: [PATCH] --- yaml --- r: 343842 b: refs/heads/master c: db61371079f898db856b8c4537c261ba0dbe626f h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/drivers/media/pci/cx88/cx88-alsa.c | 14 +++++++++----- trunk/drivers/media/pci/cx88/cx88-blackbird.c | 7 ++++--- trunk/drivers/media/pci/cx88/cx88-mpeg.c | 14 +++++++++----- 4 files changed, 23 insertions(+), 14 deletions(-) diff --git a/[refs] b/[refs] index 0d26b8a20269..74d5aee9ba55 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 342064390c7d9ba7b2381e1ddf2e5481cbac40b7 +refs/heads/master: db61371079f898db856b8c4537c261ba0dbe626f diff --git a/trunk/drivers/media/pci/cx88/cx88-alsa.c b/trunk/drivers/media/pci/cx88/cx88-alsa.c index 3aa6856ead3b..d2de1a913e19 100644 --- a/trunk/drivers/media/pci/cx88/cx88-alsa.c +++ b/trunk/drivers/media/pci/cx88/cx88-alsa.c @@ -45,11 +45,15 @@ #include "cx88.h" #include "cx88-reg.h" -#define dprintk(level,fmt, arg...) if (debug >= level) \ - printk(KERN_INFO "%s/1: " fmt, chip->core->name , ## arg) - -#define dprintk_core(level,fmt, arg...) if (debug >= level) \ - printk(KERN_DEBUG "%s/1: " fmt, chip->core->name , ## arg) +#define dprintk(level, fmt, arg...) do { \ + if (debug + 1 > level) \ + printk(KERN_INFO "%s/1: " fmt, chip->core->name , ## arg);\ +} while(0) + +#define dprintk_core(level, fmt, arg...) do { \ + if (debug + 1 > level) \ + printk(KERN_DEBUG "%s/1: " fmt, chip->core->name , ## arg);\ +} while(0) /**************************************************************************** Data type declarations - Can be moded to a header file later diff --git a/trunk/drivers/media/pci/cx88/cx88-blackbird.c b/trunk/drivers/media/pci/cx88/cx88-blackbird.c index 62184eb919e5..a6ff8a6f4fc0 100644 --- a/trunk/drivers/media/pci/cx88/cx88-blackbird.c +++ b/trunk/drivers/media/pci/cx88/cx88-blackbird.c @@ -53,9 +53,10 @@ static unsigned int debug; module_param(debug,int,0644); MODULE_PARM_DESC(debug,"enable debug messages [blackbird]"); -#define dprintk(level,fmt, arg...) if (debug >= level) \ - printk(KERN_DEBUG "%s/2-bb: " fmt, dev->core->name , ## arg) - +#define dprintk(level, fmt, arg...) do { \ + if (debug + 1 > level) \ + printk(KERN_DEBUG "%s/2-bb: " fmt, dev->core->name , ## arg); \ +} while(0) /* ------------------------------------------------------------------ */ diff --git a/trunk/drivers/media/pci/cx88/cx88-mpeg.c b/trunk/drivers/media/pci/cx88/cx88-mpeg.c index 1b7e979b87d3..d46b008a46b8 100644 --- a/trunk/drivers/media/pci/cx88/cx88-mpeg.c +++ b/trunk/drivers/media/pci/cx88/cx88-mpeg.c @@ -45,11 +45,15 @@ static unsigned int debug; module_param(debug,int,0644); MODULE_PARM_DESC(debug,"enable debug messages [mpeg]"); -#define dprintk(level,fmt, arg...) if (debug >= level) \ - printk(KERN_DEBUG "%s/2-mpeg: " fmt, dev->core->name, ## arg) - -#define mpeg_dbg(level,fmt, arg...) if (debug >= level) \ - printk(KERN_DEBUG "%s/2-mpeg: " fmt, core->name, ## arg) +#define dprintk(level, fmt, arg...) do { \ + if (debug + 1 > level) \ + printk(KERN_DEBUG "%s/2-mpeg: " fmt, dev->core->name, ## arg); \ +} while(0) + +#define mpeg_dbg(level, fmt, arg...) do { \ + if (debug + 1 > level) \ + printk(KERN_DEBUG "%s/2-mpeg: " fmt, core->name, ## arg); \ +} while(0) #if defined(CONFIG_MODULES) && defined(MODULE) static void request_module_async(struct work_struct *work)