summaryrefslogtreecommitdiff
path: root/drivers/i2c
diff options
context:
space:
mode:
authorWolfram Sang <wsa-dev@sang-engineering.com>2016-07-09 13:35:04 +0900
committerWolfram Sang <wsa@the-dreams.de>2016-07-14 22:08:08 +0900
commit44239a5afd7c568047fbaba8f32fb4b4464902b4 (patch)
treea3c0258570c307d9cbc754ef6d66d96dc7f301b7 /drivers/i2c
parentbe309c3cd3dcbebbd2b742e9a2a24482c92e01ff (diff)
i2c: use pr_fmt in the core
Now that we revisited all error messages, we can use pr_fmt for the remaining pr_* messages to ensure consistent output. Signed-off-by: Wolfram Sang <wsa-dev@sang-engineering.com> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Diffstat (limited to 'drivers/i2c')
-rw-r--r--drivers/i2c/i2c-core.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/i2c/i2c-core.c b/drivers/i2c/i2c-core.c
index 4b3d760b3f51..b2b34a0a35a1 100644
--- a/drivers/i2c/i2c-core.c
+++ b/drivers/i2c/i2c-core.c
@@ -27,6 +27,8 @@
I2C slave support (c) 2014 by Wolfram Sang <wsa@sang-engineering.com>
*/
+#define pr_fmt(fmt) "i2c-core: " fmt
+
#include <dt-bindings/i2c/i2c.h>
#include <asm/uaccess.h>
#include <linux/acpi.h>
@@ -1609,7 +1611,7 @@ static int i2c_register_adapter(struct i2c_adapter *adap)
goto out_list;
if (!adap->algo) {
- pr_err("i2c-core: adapter '%s': no algo supplied!\n", adap->name);
+ pr_err("adapter '%s': no algo supplied!\n", adap->name);
goto out_list;
}
@@ -1633,8 +1635,7 @@ static int i2c_register_adapter(struct i2c_adapter *adap)
adap->dev.type = &i2c_adapter_type;
res = device_register(&adap->dev);
if (res) {
- pr_err("i2c-core: adapter '%s': can't register device (%d)\n",
- adap->name, res);
+ pr_err("adapter '%s': can't register device (%d)\n", adap->name, res);
goto out_list;
}
@@ -1825,8 +1826,7 @@ void i2c_del_adapter(struct i2c_adapter *adap)
found = idr_find(&i2c_adapter_idr, adap->nr);
mutex_unlock(&core_lock);
if (found != adap) {
- pr_debug("i2c-core: attempting to delete unregistered "
- "adapter [%s]\n", adap->name);
+ pr_debug("attempting to delete unregistered adapter [%s]\n", adap->name);
return;
}
@@ -1986,7 +1986,7 @@ int i2c_register_driver(struct module *owner, struct i2c_driver *driver)
if (res)
return res;
- pr_debug("i2c-core: driver [%s] registered\n", driver->driver.name);
+ pr_debug("driver [%s] registered\n", driver->driver.name);
INIT_LIST_HEAD(&driver->clients);
/* Walk the adapters that are already present */
@@ -2013,7 +2013,7 @@ void i2c_del_driver(struct i2c_driver *driver)
i2c_for_each_dev(driver, __process_removed_driver);
driver_unregister(&driver->driver);
- pr_debug("i2c-core: driver [%s] unregistered\n", driver->driver.name);
+ pr_debug("driver [%s] unregistered\n", driver->driver.name);
}
EXPORT_SYMBOL(i2c_del_driver);
@@ -2722,7 +2722,7 @@ static int i2c_smbus_check_pec(u8 cpec, struct i2c_msg *msg)
cpec = i2c_smbus_msg_pec(cpec, msg);
if (rpec != cpec) {
- pr_debug("i2c-core: Bad PEC 0x%02x vs. 0x%02x\n",
+ pr_debug("Bad PEC 0x%02x vs. 0x%02x\n",
rpec, cpec);
return -EBADMSG;
}