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: Greg Kroah-Hartman <gregkh@google.com> Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org> Reviewed-by: Alex Elder <elder@linaro.org> Reviewed-by: Johan Hovold <johan@hovoldconsulting.com>
This commit is contained in:
parent
5d9c68da01
commit
7e4c8d7135
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user