mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-26 21:54:11 +08:00
greybus: connection: handle static connections
Use host-device device and connection name for log messages rather than assume that all connections have a bundle (e.g. not true for static connections). Note that the "initial" svc connection has never had a bundle. Signed-off-by: Johan Hovold <johan@hovoldconsulting.com> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
parent
729b260a67
commit
4c4b502186
@ -208,8 +208,8 @@ gb_connection_create(struct gb_host_device *hd, int hd_cport_id,
|
||||
|
||||
retval = gb_connection_bind_protocol(connection);
|
||||
if (retval) {
|
||||
dev_err(&hd->dev, "%d: failed to bind protocol: %d\n",
|
||||
cport_id, retval);
|
||||
dev_err(&hd->dev, "%s: failed to bind protocol: %d\n",
|
||||
connection->name, retval);
|
||||
gb_connection_destroy(connection);
|
||||
return NULL;
|
||||
}
|
||||
@ -320,8 +320,9 @@ gb_connection_svc_connection_create(struct gb_connection *connection)
|
||||
connection->intf_cport_id,
|
||||
intf->boot_over_unipro);
|
||||
if (ret) {
|
||||
dev_err(&connection->bundle->dev,
|
||||
"failed to create svc connection: %d\n", ret);
|
||||
dev_err(&connection->hd->dev,
|
||||
"%s: failed to create svc connection: %d\n",
|
||||
connection->name, ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -513,8 +514,9 @@ void gb_connection_latency_tag_enable(struct gb_connection *connection)
|
||||
|
||||
ret = hd->driver->latency_tag_enable(hd, connection->hd_cport_id);
|
||||
if (ret) {
|
||||
dev_err(&connection->bundle->dev,
|
||||
"failed to enable latency tag: %d\n", ret);
|
||||
dev_err(&connection->hd->dev,
|
||||
"%s: failed to enable latency tag: %d\n",
|
||||
connection->name, ret);
|
||||
}
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(gb_connection_latency_tag_enable);
|
||||
@ -529,8 +531,9 @@ void gb_connection_latency_tag_disable(struct gb_connection *connection)
|
||||
|
||||
ret = hd->driver->latency_tag_disable(hd, connection->hd_cport_id);
|
||||
if (ret) {
|
||||
dev_err(&connection->bundle->dev,
|
||||
"failed to disable latency tag: %d\n", ret);
|
||||
dev_err(&connection->hd->dev,
|
||||
"%s: failed to disable latency tag: %d\n",
|
||||
connection->name, ret);
|
||||
}
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(gb_connection_latency_tag_disable);
|
||||
|
Loading…
Reference in New Issue
Block a user