greybus: connection: replace pr_err with dev_err
authorJohan Hovold <johan@hovoldconsulting.com>
Tue, 13 Oct 2015 17:10:21 +0000 (19:10 +0200)
committerGreg Kroah-Hartman <gregkh@google.com>
Wed, 14 Oct 2015 19:00:09 +0000 (12:00 -0700)
Replace a couple of pr_err with more informative dev_err and clean up
the messages somewhat.

Signed-off-by: Johan Hovold <johan@hovoldconsulting.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
drivers/staging/greybus/connection.c

index bd3f83b2ccb6628eaa597109942f21f3825b92d7..1158674f22014061784b37a0fe825c2b9186dea9 100644 (file)
@@ -178,7 +178,7 @@ gb_connection_create_range(struct greybus_host_device *hd,
         * about holding the connection lock.
         */
        if (bundle && gb_connection_intf_find(bundle->intf, cport_id)) {
-               pr_err("duplicate interface cport id 0x%04hx\n", cport_id);
+               dev_err(parent, "cport 0x%04hx already connected\n", cport_id);
                return NULL;
        }
 
@@ -223,8 +223,8 @@ gb_connection_create_range(struct greybus_host_device *hd,
                connection->hd_cport_id = CPORT_ID_BAD;
                put_device(&connection->dev);
 
-               pr_err("failed to add connection device for cport 0x%04hx\n",
-                       cport_id);
+               dev_err(parent, "failed to register connection to cport %04hx: %d\n",
+                               cport_id, retval);
 
                goto err_remove_ida;
        }