Commit 4c4b5021 authored by Johan Hovold's avatar Johan Hovold Committed by Greg Kroah-Hartman

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: default avatarJohan Hovold <johan@hovoldconsulting.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@google.com>
parent 729b260a
...@@ -208,8 +208,8 @@ gb_connection_create(struct gb_host_device *hd, int hd_cport_id, ...@@ -208,8 +208,8 @@ gb_connection_create(struct gb_host_device *hd, int hd_cport_id,
retval = gb_connection_bind_protocol(connection); retval = gb_connection_bind_protocol(connection);
if (retval) { if (retval) {
dev_err(&hd->dev, "%d: failed to bind protocol: %d\n", dev_err(&hd->dev, "%s: failed to bind protocol: %d\n",
cport_id, retval); connection->name, retval);
gb_connection_destroy(connection); gb_connection_destroy(connection);
return NULL; return NULL;
} }
...@@ -320,8 +320,9 @@ gb_connection_svc_connection_create(struct gb_connection *connection) ...@@ -320,8 +320,9 @@ gb_connection_svc_connection_create(struct gb_connection *connection)
connection->intf_cport_id, connection->intf_cport_id,
intf->boot_over_unipro); intf->boot_over_unipro);
if (ret) { if (ret) {
dev_err(&connection->bundle->dev, dev_err(&connection->hd->dev,
"failed to create svc connection: %d\n", ret); "%s: failed to create svc connection: %d\n",
connection->name, ret);
return ret; return ret;
} }
...@@ -513,8 +514,9 @@ void gb_connection_latency_tag_enable(struct gb_connection *connection) ...@@ -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); ret = hd->driver->latency_tag_enable(hd, connection->hd_cport_id);
if (ret) { if (ret) {
dev_err(&connection->bundle->dev, dev_err(&connection->hd->dev,
"failed to enable latency tag: %d\n", ret); "%s: failed to enable latency tag: %d\n",
connection->name, ret);
} }
} }
EXPORT_SYMBOL_GPL(gb_connection_latency_tag_enable); EXPORT_SYMBOL_GPL(gb_connection_latency_tag_enable);
...@@ -529,8 +531,9 @@ void gb_connection_latency_tag_disable(struct gb_connection *connection) ...@@ -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); ret = hd->driver->latency_tag_disable(hd, connection->hd_cport_id);
if (ret) { if (ret) {
dev_err(&connection->bundle->dev, dev_err(&connection->hd->dev,
"failed to disable latency tag: %d\n", ret); "%s: failed to disable latency tag: %d\n",
connection->name, ret);
} }
} }
EXPORT_SYMBOL_GPL(gb_connection_latency_tag_disable); EXPORT_SYMBOL_GPL(gb_connection_latency_tag_disable);
......
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