aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/i2c/busses/scx200_i2c.c
diff options
context:
space:
mode:
authorJim Cromie <jim.cromie@gmail.com>2012-10-05 22:23:52 +0200
committerJean Delvare <khali@endymion.delvare>2012-10-05 22:23:52 +0200
commit401e72b55d29f1a08d3dfd7a6a6c2087203b6524 (patch)
treea671320b905e28f2e4e1cdb23478127aaed7ceda /drivers/i2c/busses/scx200_i2c.c
parenti2c: Make I2C available on UML (diff)
downloadlinux-dev-401e72b55d29f1a08d3dfd7a6a6c2087203b6524.tar.xz
linux-dev-401e72b55d29f1a08d3dfd7a6a6c2087203b6524.zip
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>
Diffstat (limited to '')
-rw-r--r--drivers/i2c/busses/scx200_i2c.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/drivers/i2c/busses/scx200_i2c.c b/drivers/i2c/busses/scx200_i2c.c
index 7ee0d502ceab..ae1258b95d60 100644
--- a/drivers/i2c/busses/scx200_i2c.c
+++ b/drivers/i2c/busses/scx200_i2c.c
@@ -21,6 +21,8 @@
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
#include <linux/module.h>
#include <linux/errno.h>
#include <linux/kernel.h>
@@ -31,8 +33,6 @@
#include <linux/scx200_gpio.h>
-#define NAME "scx200_i2c"
-
MODULE_AUTHOR("Christer Weinigel <wingel@nano-system.com>");
MODULE_DESCRIPTION("NatSemi SCx200 I2C Driver");
MODULE_LICENSE("GPL");
@@ -88,17 +88,17 @@ static struct i2c_adapter scx200_i2c_ops = {
static int scx200_i2c_init(void)
{
- pr_debug(NAME ": NatSemi SCx200 I2C Driver\n");
+ pr_debug("NatSemi SCx200 I2C Driver\n");
if (!scx200_gpio_present()) {
- printk(KERN_ERR NAME ": no SCx200 gpio pins available\n");
+ pr_err("no SCx200 gpio pins available\n");
return -ENODEV;
}
- pr_debug(NAME ": SCL=GPIO%02u, SDA=GPIO%02u\n", scl, sda);
+ pr_debug("SCL=GPIO%02u, SDA=GPIO%02u\n", scl, sda);
if (scl == -1 || sda == -1 || scl == sda) {
- printk(KERN_ERR NAME ": scl and sda must be specified\n");
+ pr_err("scl and sda must be specified\n");
return -EINVAL;
}
@@ -107,8 +107,7 @@ static int scx200_i2c_init(void)
scx200_gpio_configure(sda, ~2, 5);
if (i2c_bit_add_bus(&scx200_i2c_ops) < 0) {
- printk(KERN_ERR NAME ": adapter %s registration failed\n",
- scx200_i2c_ops.name);
+ pr_err("adapter %s registration failed\n", scx200_i2c_ops.name);
return -ENODEV;
}