Commit 87757e32 authored by Johan Hovold's avatar Johan Hovold Committed by Greg Kroah-Hartman

greybus: protocol: handle static connections

Use host-device device and connection name for log messages, as not all
connections have a bundle.

Note that the "initial" svc connection has never had a bundle.
Signed-off-by: default avatarJohan Hovold <johan@hovoldconsulting.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@google.com>
parent 25cdd7aa
...@@ -165,9 +165,9 @@ int gb_protocol_get_version(struct gb_connection *connection) ...@@ -165,9 +165,9 @@ int gb_protocol_get_version(struct gb_connection *connection)
return retval; return retval;
if (response.major > connection->protocol->major) { if (response.major > connection->protocol->major) {
dev_err(&connection->bundle->dev, dev_err(&connection->hd->dev,
"%d: unsupported major version (%hhu > %hhu)\n", "%s: unsupported major version (%hhu > %hhu)\n",
connection->intf_cport_id, response.major, connection->name, response.major,
connection->protocol->major); connection->protocol->major);
return -ENOTSUPP; return -ENOTSUPP;
} }
...@@ -175,8 +175,8 @@ int gb_protocol_get_version(struct gb_connection *connection) ...@@ -175,8 +175,8 @@ int gb_protocol_get_version(struct gb_connection *connection)
connection->module_major = response.major; connection->module_major = response.major;
connection->module_minor = response.minor; connection->module_minor = response.minor;
dev_dbg(&connection->bundle->dev, dev_dbg(&connection->hd->dev,
"%d: %s (0x%02hhx) v%hhu.%hhu\n", connection->intf_cport_id, "%s: %s (0x%02hhx) v%hhu.%hhu\n", connection->name,
protocol->name, protocol->id, response.major, response.minor); protocol->name, protocol->id, response.major, response.minor);
return 0; return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment