diff options
author | Frank Schaefer <fschaefer.oss@googlemail.com> | 2013-03-03 15:37:35 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2013-03-04 15:20:14 -0300 |
commit | d7a80eaa9a2adce908ad0707faea4f776199a48a (patch) | |
tree | e964b540194f05c88c49e53803cdefc19aa852ea /drivers/media/usb/em28xx/em28xx-i2c.c | |
parent | 43a20d791031d5bbc92e143ff077a9bd2a4d438c (diff) | |
download | blackbird-op-linux-d7a80eaa9a2adce908ad0707faea4f776199a48a.tar.gz blackbird-op-linux-d7a80eaa9a2adce908ad0707faea4f776199a48a.zip |
[media] em28xx-i2c: get rid of the dprintk2 macro
There is only a single place where the dprintk2 macro is used, so get rid of it.
[mchehab@redhat.com: fix checkpathc.pl complain:
ERROR: space prohibited before that close parenthesis ')']
Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/usb/em28xx/em28xx-i2c.c')
-rw-r--r-- | drivers/media/usb/em28xx/em28xx-i2c.c | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/drivers/media/usb/em28xx/em28xx-i2c.c b/drivers/media/usb/em28xx/em28xx-i2c.c index 8532c1d4fd46..4ffcafb6ac9a 100644 --- a/drivers/media/usb/em28xx/em28xx-i2c.c +++ b/drivers/media/usb/em28xx/em28xx-i2c.c @@ -41,14 +41,6 @@ static unsigned int i2c_debug; module_param(i2c_debug, int, 0644); MODULE_PARM_DESC(i2c_debug, "enable debug messages [i2c]"); -#define dprintk2(lvl, fmt, args...) \ -do { \ - if (i2c_debug >= lvl) { \ - printk(KERN_DEBUG "%s at %s: " fmt, \ - dev->name, __func__ , ##args); \ - } \ -} while (0) - /* * em2800_i2c_send_bytes() * send up to 4 bytes to the em2800 i2c device @@ -295,9 +287,12 @@ static int em28xx_i2c_xfer(struct i2c_adapter *i2c_adap, return 0; for (i = 0; i < num; i++) { addr = msgs[i].addr << 1; - dprintk2(2, "%s %s addr=%x len=%d:", - (msgs[i].flags & I2C_M_RD) ? "read" : "write", - i == num - 1 ? "stop" : "nonstop", addr, msgs[i].len); + if (i2c_debug >= 2) + printk(KERN_DEBUG "%s at %s: %s %s addr=%02x len=%d:", + dev->name, __func__ , + (msgs[i].flags & I2C_M_RD) ? "read" : "write", + i == num - 1 ? "stop" : "nonstop", + addr, msgs[i].len); if (!msgs[i].len) { /* no len: check only for device presence */ if (dev->board.is_em2800) rc = em2800_i2c_check_for_device(dev, addr); |