summaryrefslogtreecommitdiff
path: root/drivers/i2c
diff options
context:
space:
mode:
authorFrank Seidel <frank@f-seidel.de>2009-03-28 21:34:44 +0100
committerJean Delvare <khali@linux-fr.org>2009-03-28 21:34:44 +0100
commitbac3e7c2aa2575a1c71f6fa643499676ca7c12c3 (patch)
treee275ff07b02c1b6fb6e20a68ccf9eb2043871fcd /drivers/i2c
parent98a679cad56c0ba4677821836179abbe0aff8769 (diff)
downloadlinux-3.10-bac3e7c2aa2575a1c71f6fa643499676ca7c12c3.tar.gz
linux-3.10-bac3e7c2aa2575a1c71f6fa643499676ca7c12c3.tar.bz2
linux-3.10-bac3e7c2aa2575a1c71f6fa643499676ca7c12c3.zip
i2c: Adapt debug macros for KERN_* constants
According to kerneljanitors todo list all printk calls (beginning a new line) should have an according KERN_* constant. Those are the changes to the debug macros in the i2c subsystem to meet this requirement. Also changing no-debug statements to raw printks again. Signed-off-by: Frank Seidel <frank@f-seidel.de> Signed-off-by: Jean Delvare <khali@linux-fr.org> Tested-by: Wolfram Sang <w.sang@pengutronix.de>
Diffstat (limited to 'drivers/i2c')
-rw-r--r--drivers/i2c/algos/i2c-algo-pca.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/drivers/i2c/algos/i2c-algo-pca.c b/drivers/i2c/algos/i2c-algo-pca.c
index d50b329a3c9..943d70ee5d5 100644
--- a/drivers/i2c/algos/i2c-algo-pca.c
+++ b/drivers/i2c/algos/i2c-algo-pca.c
@@ -27,9 +27,12 @@
#include <linux/i2c.h>
#include <linux/i2c-algo-pca.h>
-#define DEB1(fmt, args...) do { if (i2c_debug>=1) printk(fmt, ## args); } while(0)
-#define DEB2(fmt, args...) do { if (i2c_debug>=2) printk(fmt, ## args); } while(0)
-#define DEB3(fmt, args...) do { if (i2c_debug>=3) printk(fmt, ## args); } while(0)
+#define DEB1(fmt, args...) do { if (i2c_debug >= 1) \
+ printk(KERN_DEBUG fmt, ## args); } while (0)
+#define DEB2(fmt, args...) do { if (i2c_debug >= 2) \
+ printk(KERN_DEBUG fmt, ## args); } while (0)
+#define DEB3(fmt, args...) do { if (i2c_debug >= 3) \
+ printk(KERN_DEBUG fmt, ## args); } while (0)
static int i2c_debug;
@@ -313,7 +316,7 @@ static int pca_xfer(struct i2c_adapter *i2c_adap,
ret = curmsg;
out:
- DEB1(KERN_CRIT "}}} transfered %d/%d messages. "
+ DEB1("}}} transfered %d/%d messages. "
"status is %#04x. control is %#04x\n",
curmsg, num, pca_status(adap),
pca_get_con(adap));
@@ -347,7 +350,8 @@ static int pca_init(struct i2c_adapter *adap)
pca_reset(pca_data);
clock = pca_clock(pca_data);
- DEB1(KERN_INFO "%s: Clock frequency is %dkHz\n", adap->name, freqs[clock]);
+ printk(KERN_INFO "%s: Clock frequency is %dkHz\n", adap->name,
+ freqs[clock]);
pca_set_con(pca_data, I2C_PCA_CON_ENSIO | clock);
udelay(500); /* 500 us for oscilator to stabilise */