diff options
author | Johan Hovold <johan@hovoldconsulting.com> | 2016-02-11 12:52:48 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@google.com> | 2016-02-12 05:44:17 (GMT) |
commit | 6d6fb2549f23d5d7d3494574b49e35df8e737645 (patch) | |
tree | 04a59ed6a228b86e4cbccc0e8d17403a3fddbccd | |
parent | b427572ebff3abba436a9ae45db73c78fa3ddcf8 (diff) | |
download | linux-6d6fb2549f23d5d7d3494574b49e35df8e737645.tar.xz |
greybus: i2c: add bundle-device prefix to error messages
Replace all pr_err with dev_err so we can tell what device (and driver)
a message was for.
Testing Done: Compiled
Signed-off-by: Johan Hovold <johan@hovoldconsulting.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
-rw-r--r-- | drivers/staging/greybus/i2c.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/staging/greybus/i2c.c b/drivers/staging/greybus/i2c.c index 5a5af36..ec74e87 100644 --- a/drivers/staging/greybus/i2c.c +++ b/drivers/staging/greybus/i2c.c @@ -52,6 +52,7 @@ static int gb_i2c_functionality_operation(struct gb_i2c_device *gb_i2c_dev) static int gb_i2c_timeout_operation(struct gb_i2c_device *gb_i2c_dev, u16 msec) { + struct device *dev = &gb_i2c_dev->connection->bundle->dev; struct gb_i2c_timeout_request request; int ret; @@ -59,7 +60,7 @@ static int gb_i2c_timeout_operation(struct gb_i2c_device *gb_i2c_dev, u16 msec) ret = gb_operation_sync(gb_i2c_dev->connection, GB_I2C_TYPE_TIMEOUT, &request, sizeof(request), NULL, 0); if (ret) - pr_err("timeout operation failed (%d)\n", ret); + dev_err(dev, "timeout operation failed (%d)\n", ret); else gb_i2c_dev->timeout_msec = msec; @@ -69,6 +70,7 @@ static int gb_i2c_timeout_operation(struct gb_i2c_device *gb_i2c_dev, u16 msec) static int gb_i2c_retries_operation(struct gb_i2c_device *gb_i2c_dev, u8 retries) { + struct device *dev = &gb_i2c_dev->connection->bundle->dev; struct gb_i2c_retries_request request; int ret; @@ -76,7 +78,7 @@ static int gb_i2c_retries_operation(struct gb_i2c_device *gb_i2c_dev, ret = gb_operation_sync(gb_i2c_dev->connection, GB_I2C_TYPE_RETRIES, &request, sizeof(request), NULL, 0); if (ret) - pr_err("retries operation failed (%d)\n", ret); + dev_err(dev, "retries operation failed (%d)\n", ret); else gb_i2c_dev->retries = retries; @@ -201,6 +203,7 @@ static int gb_i2c_transfer_operation(struct gb_i2c_device *gb_i2c_dev, struct i2c_msg *msgs, u32 msg_count) { struct gb_connection *connection = gb_i2c_dev->connection; + struct device *dev = &connection->bundle->dev; struct gb_operation *operation; int ret; @@ -216,7 +219,7 @@ static int gb_i2c_transfer_operation(struct gb_i2c_device *gb_i2c_dev, gb_i2c_decode_response(msgs, msg_count, response); ret = msg_count; } else if (!gb_i2c_expected_transfer_error(ret)) { - pr_err("transfer operation failed (%d)\n", ret); + dev_err(dev, "transfer operation failed (%d)\n", ret); } gb_operation_put(operation); |