Skip to content

Commit

Permalink
V4L/DVB (7014): cx23885: dprintk macro cleanup
Browse files Browse the repository at this point in the history
Added missing do { } while (0)

Signed-off-by: Steven Toth <stoth@hauppauge.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
  • Loading branch information
Steven Toth authored and Mauro Carvalho Chehab committed Jan 25, 2008
1 parent d685a48 commit 4513fc6
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 17 deletions.
8 changes: 5 additions & 3 deletions drivers/media/video/cx23885/cx23885-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,16 +36,18 @@ MODULE_DESCRIPTION("Driver for cx23885 based TV cards");
MODULE_AUTHOR("Steven Toth <stoth@hauppauge.com>");
MODULE_LICENSE("GPL");

static unsigned int debug = 0;
static unsigned int debug;
module_param(debug,int,0644);
MODULE_PARM_DESC(debug,"enable debug messages");

static unsigned int card[] = {[0 ... (CX23885_MAXBOARDS - 1)] = UNSET };
module_param_array(card, int, NULL, 0444);
MODULE_PARM_DESC(card,"card type");

#define dprintk(level,fmt, arg...) if (debug >= level) \
printk(KERN_DEBUG "%s/0: " fmt, dev->name , ## arg)
#define dprintk(level, fmt, arg...)\
do { if (debug >= level)\
printk(KERN_DEBUG "%s/0: " fmt, dev->name, ## arg);\
} while (0)

static unsigned int cx23885_devcount;

Expand Down
8 changes: 5 additions & 3 deletions drivers/media/video/cx23885/cx23885-dvb.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,12 @@
#include "tuner-xc2028.h"
#include "tuner-xc2028-types.h"

static unsigned int debug = 0;
static unsigned int debug;

#define dprintk(level,fmt, arg...) if (debug >= level) \
printk(KERN_DEBUG "%s: " fmt, dev->name, ## arg)
#define dprintk(level, fmt, arg...)\
do { if (debug >= level)\
printk(KERN_DEBUG "%s/0: " fmt, dev->name, ## arg);\
} while (0)

/* ------------------------------------------------------------------ */

Expand Down
8 changes: 4 additions & 4 deletions drivers/media/video/cx23885/cx23885-i2c.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,17 @@

#include <media/v4l2-common.h>

static unsigned int i2c_debug = 0;
static unsigned int i2c_debug;
module_param(i2c_debug, int, 0644);
MODULE_PARM_DESC(i2c_debug, "enable debug messages [i2c]");

static unsigned int i2c_scan = 0;
module_param(i2c_scan, int, 0444);
MODULE_PARM_DESC(i2c_scan, "scan i2c bus at insmod time");

#define dprintk(level, fmt, arg...) do { \
if (i2c_debug >= level) \
printk(KERN_DEBUG "%s: " fmt, dev->name , ## arg); \
#define dprintk(level, fmt, arg...)\
do { if (i2c_debug >= level)\
printk(KERN_DEBUG "%s/0: " fmt, dev->name, ## arg);\
} while (0)

#define I2C_WAIT_DELAY 32
Expand Down
8 changes: 5 additions & 3 deletions drivers/media/video/cx23885/cx23885-vbi.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,14 @@ static unsigned int vbibufs = 4;
module_param(vbibufs, int, 0644);
MODULE_PARM_DESC(vbibufs, "number of vbi buffers, range 2-32");

static unsigned int vbi_debug = 0;
static unsigned int vbi_debug;
module_param(vbi_debug, int, 0644);
MODULE_PARM_DESC(vbi_debug, "enable debug messages [vbi]");

#define dprintk(level, fmt, arg...) if (vbi_debug >= level) \
printk(KERN_DEBUG "%s: " fmt, dev->name , ## arg)
#define dprintk(level, fmt, arg...)\
do { if (vbi_debug >= level)\
printk(KERN_DEBUG "%s/0: " fmt, dev->name, ## arg);\
} while (0)

/* ------------------------------------------------------------------ */

Expand Down
9 changes: 5 additions & 4 deletions drivers/media/video/cx23885/cx23885-video.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,11 @@ MODULE_PARM_DESC(video_nr, "video device numbers");
MODULE_PARM_DESC(vbi_nr, "vbi device numbers");
MODULE_PARM_DESC(radio_nr, "radio device numbers");

static unsigned int video_debug = 0;
static unsigned int video_debug;
module_param(video_debug, int, 0644);
MODULE_PARM_DESC(video_debug, "enable debug messages [video]");

static unsigned int irq_debug = 0;
static unsigned int irq_debug;
module_param(irq_debug, int, 0644);
MODULE_PARM_DESC(irq_debug, "enable debug messages [IRQ handler]");

Expand All @@ -70,8 +70,9 @@ module_param(vid_limit, int, 0644);
MODULE_PARM_DESC(vid_limit, "capture memory limit in megabytes");

#define dprintk(level, fmt, arg...)\
if (video_debug >= level)\
printk(KERN_DEBUG "%s/0: " fmt, dev->name, ## arg)
do { if (video_debug >= level)\
printk(KERN_DEBUG "%s/0: " fmt, dev->name, ## arg);\
} while (0)

/* ------------------------------------------------------------------- */
/* static data */
Expand Down

0 comments on commit 4513fc6

Please sign in to comment.