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

i2c/scx200_*: Replace printks with pr_<level>s

Replace printks with pr_<level>s, add pr_fmt()s to replace NAMEs

Signed-off-by: Jim Cromie <jim.cromie@gmail.com>
Reviewed-by: Joe Perches <joe@perches.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>

authored by

Jim Cromie and committed by
Jean Delvare
401e72b5 3ddb59d4

+18 -21
+11 -13
drivers/i2c/busses/scx200_acb.c
··· 23 23 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 24 24 */ 25 25 26 + #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt 27 + 26 28 #include <linux/module.h> 27 29 #include <linux/errno.h> 28 30 #include <linux/kernel.h> ··· 38 36 #include <linux/io.h> 39 37 40 38 #include <linux/scx200.h> 41 - 42 - #define NAME "scx200_acb" 43 39 44 40 MODULE_AUTHOR("Christer Weinigel <wingel@nano-system.com>"); 45 41 MODULE_DESCRIPTION("NatSemi SCx200 ACCESS.bus Driver"); ··· 398 398 outb(0x70, ACBCTL2); 399 399 400 400 if (inb(ACBCTL2) != 0x70) { 401 - pr_debug(NAME ": ACBCTL2 readback failed\n"); 401 + pr_debug("ACBCTL2 readback failed\n"); 402 402 return -ENXIO; 403 403 } 404 404 ··· 406 406 407 407 val = inb(ACBCTL1); 408 408 if (val) { 409 - pr_debug(NAME ": disabled, but ACBCTL1=0x%02x\n", 410 - val); 409 + pr_debug("disabled, but ACBCTL1=0x%02x\n", val); 411 410 return -ENXIO; 412 411 } 413 412 ··· 416 417 417 418 val = inb(ACBCTL1); 418 419 if ((val & ACBCTL1_NMINTE) != ACBCTL1_NMINTE) { 419 - pr_debug(NAME ": enabled, but NMINTE won't be set, " 420 - "ACBCTL1=0x%02x\n", val); 420 + pr_debug("enabled, but NMINTE won't be set, ACBCTL1=0x%02x\n", 421 + val); 421 422 return -ENXIO; 422 423 } 423 424 ··· 432 433 433 434 iface = kzalloc(sizeof(*iface), GFP_KERNEL); 434 435 if (!iface) { 435 - printk(KERN_ERR NAME ": can't allocate memory\n"); 436 + pr_err("can't allocate memory\n"); 436 437 return NULL; 437 438 } 438 439 ··· 458 459 459 460 rc = scx200_acb_probe(iface); 460 461 if (rc) { 461 - printk(KERN_WARNING NAME ": probe failed\n"); 462 + pr_warn("probe failed\n"); 462 463 return rc; 463 464 } 464 465 465 466 scx200_acb_reset(iface); 466 467 467 468 if (i2c_add_adapter(adapter) < 0) { 468 - printk(KERN_ERR NAME ": failed to register\n"); 469 + pr_err("failed to register\n"); 469 470 return -ENODEV; 470 471 } 471 472 ··· 492 493 return NULL; 493 494 494 495 if (!request_region(base, 8, iface->adapter.name)) { 495 - printk(KERN_ERR NAME ": can't allocate io 0x%lx-0x%lx\n", 496 - base, base + 8 - 1); 496 + pr_err("can't allocate io 0x%lx-0x%lx\n", base, base + 8 - 1); 497 497 goto errout_free; 498 498 } 499 499 ··· 581 583 582 584 static int __init scx200_acb_init(void) 583 585 { 584 - pr_debug(NAME ": NatSemi SCx200 ACCESS.bus Driver\n"); 586 + pr_debug("NatSemi SCx200 ACCESS.bus Driver\n"); 585 587 586 588 /* First scan for ISA-based devices */ 587 589 scx200_scan_isa(); /* XXX: should we care about errors? */
+7 -8
drivers/i2c/busses/scx200_i2c.c
··· 21 21 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 22 22 */ 23 23 24 + #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt 25 + 24 26 #include <linux/module.h> 25 27 #include <linux/errno.h> 26 28 #include <linux/kernel.h> ··· 32 30 #include <linux/io.h> 33 31 34 32 #include <linux/scx200_gpio.h> 35 - 36 - #define NAME "scx200_i2c" 37 33 38 34 MODULE_AUTHOR("Christer Weinigel <wingel@nano-system.com>"); 39 35 MODULE_DESCRIPTION("NatSemi SCx200 I2C Driver"); ··· 88 88 89 89 static int scx200_i2c_init(void) 90 90 { 91 - pr_debug(NAME ": NatSemi SCx200 I2C Driver\n"); 91 + pr_debug("NatSemi SCx200 I2C Driver\n"); 92 92 93 93 if (!scx200_gpio_present()) { 94 - printk(KERN_ERR NAME ": no SCx200 gpio pins available\n"); 94 + pr_err("no SCx200 gpio pins available\n"); 95 95 return -ENODEV; 96 96 } 97 97 98 - pr_debug(NAME ": SCL=GPIO%02u, SDA=GPIO%02u\n", scl, sda); 98 + pr_debug("SCL=GPIO%02u, SDA=GPIO%02u\n", scl, sda); 99 99 100 100 if (scl == -1 || sda == -1 || scl == sda) { 101 - printk(KERN_ERR NAME ": scl and sda must be specified\n"); 101 + pr_err("scl and sda must be specified\n"); 102 102 return -EINVAL; 103 103 } 104 104 ··· 107 107 scx200_gpio_configure(sda, ~2, 5); 108 108 109 109 if (i2c_bit_add_bus(&scx200_i2c_ops) < 0) { 110 - printk(KERN_ERR NAME ": adapter %s registration failed\n", 111 - scx200_i2c_ops.name); 110 + pr_err("adapter %s registration failed\n", scx200_i2c_ops.name); 112 111 return -ENODEV; 113 112 } 114 113