Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/signal
[firefly-linux-kernel-4.4.55.git] / drivers / i2c / busses / scx200_i2c.c
index 7ee0d502ceab51da27b5358f5e1d2f1725447ae7..ae1258b95d6041cdfbba0194cbe0de0bf1a8d529 100644 (file)
@@ -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;
        }