]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
greybus: operation: replace pr_err with dev_err
authorJohan Hovold <johan@hovoldconsulting.com>
Fri, 27 Mar 2015 11:41:19 +0000 (12:41 +0100)
committerGreg Kroah-Hartman <greg@kroah.com>
Mon, 30 Mar 2015 13:13:01 +0000 (15:13 +0200)
Use dev_err whenever we have a connection for more informative error
messages.

Signed-off-by: Johan Hovold <johan@hovoldconsulting.com>
Reviewed-by: Alex Elder <elder@linaro.org>
Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
drivers/staging/greybus/operation.c

index 8e37d144c89f41860504c61802d914c15c929578..878bfdb6781e3ea6869f14187538c4911e3d16e6 100644 (file)
@@ -730,17 +730,19 @@ EXPORT_SYMBOL_GPL(gb_operation_request_send_sync);
  */
 int gb_operation_response_send(struct gb_operation *operation, int errno)
 {
+       struct gb_connection *connection = operation->connection;
        int ret;
 
        /* Record the result */
        if (!gb_operation_result_set(operation, errno)) {
-               pr_err("request result already set\n");
+               dev_err(&connection->dev, "request result already set\n");
                return -EIO;    /* Shouldn't happen */
        }
 
        if (!operation->response) {
                if (!gb_operation_response_alloc(operation, 0)) {
-                       pr_err("error allocating response\n");
+                       dev_err(&connection->dev,
+                               "error allocating response\n");
                        /* XXX Respond with pre-allocated -ENOMEM? */
                        return -ENOMEM;
                }
@@ -787,8 +789,10 @@ greybus_data_sent(struct greybus_host_device *hd, void *header, int status)
         */
        operation = message->operation;
        if (message == operation->response) {
-               if (status)
-                       pr_err("error %d sending response\n", status);
+               if (status) {
+                       dev_err(&operation->connection->dev,
+                               "error sending response: %d\n", status);
+               }
                gb_operation_put(operation);
        } else if (status) {
                if (gb_operation_result_set(operation, status))