]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commitdiff
greybus: protocol: make version debug message more informative
authorJohan Hovold <johan@hovoldconsulting.com>
Tue, 13 Oct 2015 17:10:26 +0000 (19:10 +0200)
committerGreg Kroah-Hartman <gregkh@google.com>
Wed, 14 Oct 2015 19:06:00 +0000 (12:06 -0700)
Include function, protocol name and id when printing the version
response debug message.

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

index b9de152bade08b1665f92b64662b4c84e6673b41..41190e8dfccb7bf88810308f71dd4c5016a91f97 100644 (file)
@@ -155,10 +155,11 @@ int gb_protocol_get_version(struct gb_connection *connection)
 {
        struct gb_protocol_version_request request;
        struct gb_protocol_version_response response;
+       struct gb_protocol *protocol = connection->protocol;
        int retval;
 
-       request.major = connection->protocol->major;
-       request.minor = connection->protocol->minor;
+       request.major = protocol->major;
+       request.minor = protocol->minor;
 
        retval = gb_operation_sync(connection, GB_REQUEST_TYPE_PROTOCOL_VERSION,
                                   &request, sizeof(request), &response,
@@ -176,8 +177,10 @@ int gb_protocol_get_version(struct gb_connection *connection)
        connection->module_major = response.major;
        connection->module_minor = response.minor;
 
-       dev_dbg(&connection->dev, "version_major = %u version_minor = %u\n",
-               response.major, response.minor);
+
+       dev_dbg(&connection->dev, "%s - %s (0x%02hhx) v%hhu.%hhu\n", __func__,
+                       protocol->name, protocol->id,
+                       response.major, response.minor);
 
        return 0;
 }