Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Frank Seidel and committed by
Jean Delvare
bac3e7c2 98a679ca

+9 -5
+9 -5
drivers/i2c/algos/i2c-algo-pca.c
··· 27 27 #include <linux/i2c.h> 28 28 #include <linux/i2c-algo-pca.h> 29 29 30 - #define DEB1(fmt, args...) do { if (i2c_debug>=1) printk(fmt, ## args); } while(0) 31 - #define DEB2(fmt, args...) do { if (i2c_debug>=2) printk(fmt, ## args); } while(0) 32 - #define DEB3(fmt, args...) do { if (i2c_debug>=3) printk(fmt, ## args); } while(0) 30 + #define DEB1(fmt, args...) do { if (i2c_debug >= 1) \ 31 + printk(KERN_DEBUG fmt, ## args); } while (0) 32 + #define DEB2(fmt, args...) do { if (i2c_debug >= 2) \ 33 + printk(KERN_DEBUG fmt, ## args); } while (0) 34 + #define DEB3(fmt, args...) do { if (i2c_debug >= 3) \ 35 + printk(KERN_DEBUG fmt, ## args); } while (0) 33 36 34 37 static int i2c_debug; 35 38 ··· 316 313 317 314 ret = curmsg; 318 315 out: 319 - DEB1(KERN_CRIT "}}} transfered %d/%d messages. " 316 + DEB1("}}} transfered %d/%d messages. " 320 317 "status is %#04x. control is %#04x\n", 321 318 curmsg, num, pca_status(adap), 322 319 pca_get_con(adap)); ··· 350 347 pca_reset(pca_data); 351 348 352 349 clock = pca_clock(pca_data); 353 - DEB1(KERN_INFO "%s: Clock frequency is %dkHz\n", adap->name, freqs[clock]); 350 + printk(KERN_INFO "%s: Clock frequency is %dkHz\n", adap->name, 351 + freqs[clock]); 354 352 355 353 pca_set_con(pca_data, I2C_PCA_CON_ENSIO | clock); 356 354 udelay(500); /* 500 us for oscilator to stabilise */