提交 7e4c8d71 编写于 作者: G 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: NGreg Kroah-Hartman <gregkh@google.com>
Reviewed-by: NViresh Kumar <viresh.kumar@linaro.org>
Reviewed-by: NAlex Elder <elder@linaro.org>
Reviewed-by: NJohan Hovold <johan@hovoldconsulting.com>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册