Commit 7e4c8d71 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

greybus: protocol: use the bundle struct device instead of the connector

We are removing struct device from the gb_connection structure in the
near future.  The gb_bundle structure's struct device should be used as
a replacement.

This patch moves the protocol code to use the bundle pointer instead of
the connection pointer when printing out error messages.
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@google.com>
Reviewed-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
Reviewed-by: default avatarAlex Elder <elder@linaro.org>
Reviewed-by: default avatarJohan Hovold <johan@hovoldconsulting.com>
parent 5d9c68da
......@@ -165,19 +165,19 @@ int gb_protocol_get_version(struct gb_connection *connection)
return retval;
if (response.major > connection->protocol->major) {
dev_err(&connection->dev,
"unsupported major version (%hhu > %hhu)\n",
response.major, connection->protocol->major);
dev_err(&connection->bundle->dev,
"%d: unsupported major version (%hhu > %hhu)\n",
connection->intf_cport_id, response.major,
connection->protocol->major);
return -ENOTSUPP;
}
connection->module_major = response.major;
connection->module_minor = response.minor;
dev_dbg(&connection->dev, "%s - %s (0x%02hhx) v%hhu.%hhu\n", __func__,
protocol->name, protocol->id,
response.major, response.minor);
dev_dbg(&connection->bundle->dev,
"%d: %s (0x%02hhx) v%hhu.%hhu\n", connection->intf_cport_id,
protocol->name, protocol->id, response.major, response.minor);
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