Commit 30482c1e authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

greybus: connection: 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 connection code to use the bundle pointer instead
of the connection pointer for some 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 b750fa33
...@@ -173,8 +173,8 @@ gb_connection_create_range(struct greybus_host_device *hd, ...@@ -173,8 +173,8 @@ gb_connection_create_range(struct greybus_host_device *hd,
retval = gb_connection_bind_protocol(connection); retval = gb_connection_bind_protocol(connection);
if (retval) { if (retval) {
dev_err(&connection->dev, "failed to bind protocol: %d\n", dev_err(&bundle->dev, "%d: failed to bind protocol: %d\n",
retval); cport_id, retval);
gb_connection_destroy(connection); gb_connection_destroy(connection);
return NULL; return NULL;
} }
...@@ -199,8 +199,8 @@ static int gb_connection_hd_cport_enable(struct gb_connection *connection) ...@@ -199,8 +199,8 @@ static int gb_connection_hd_cport_enable(struct gb_connection *connection)
ret = hd->driver->cport_enable(hd, connection->hd_cport_id); ret = hd->driver->cport_enable(hd, connection->hd_cport_id);
if (ret) { if (ret) {
dev_err(&connection->dev, dev_err(&connection->bundle->dev,
"failed to enable host cport: %d\n", ret); "failed to enable host cport: %d\n", ret);
return ret; return ret;
} }
...@@ -277,8 +277,8 @@ gb_connection_svc_connection_create(struct gb_connection *connection) ...@@ -277,8 +277,8 @@ 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->dev, dev_err(&connection->bundle->dev,
"failed to create svc connection: %d\n", ret); "failed to create svc connection: %d\n", ret);
return ret; return ret;
} }
...@@ -313,8 +313,8 @@ static int gb_connection_control_connected(struct gb_connection *connection) ...@@ -313,8 +313,8 @@ static int gb_connection_control_connected(struct gb_connection *connection)
ret = gb_control_connected_operation(control, cport_id); ret = gb_control_connected_operation(control, cport_id);
if (ret) { if (ret) {
dev_err(&connection->dev, dev_err(&connection->bundle->dev,
"failed to connect cport: %d\n", ret); "failed to connect cport: %d\n", ret);
return ret; return ret;
} }
...@@ -337,8 +337,8 @@ gb_connection_control_disconnected(struct gb_connection *connection) ...@@ -337,8 +337,8 @@ gb_connection_control_disconnected(struct gb_connection *connection)
ret = gb_control_disconnected_operation(control, cport_id); ret = gb_control_disconnected_operation(control, cport_id);
if (ret) { if (ret) {
dev_warn(&connection->dev, dev_warn(&connection->bundle->dev,
"failed to disconnect cport: %d\n", ret); "failed to disconnect cport: %d\n", ret);
} }
} }
...@@ -356,8 +356,8 @@ static int gb_connection_protocol_get_version(struct gb_connection *connection) ...@@ -356,8 +356,8 @@ static int gb_connection_protocol_get_version(struct gb_connection *connection)
ret = gb_protocol_get_version(connection); ret = gb_protocol_get_version(connection);
if (ret) { if (ret) {
dev_err(&connection->dev, dev_err(&connection->bundle->dev,
"failed to get protocol version: %d\n", ret); "failed to get protocol version: %d\n", ret);
return ret; return ret;
} }
...@@ -470,7 +470,7 @@ void gb_connection_latency_tag_enable(struct gb_connection *connection) ...@@ -470,7 +470,7 @@ 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->dev, dev_err(&connection->bundle->dev,
"failed to enable latency tag: %d\n", ret); "failed to enable latency tag: %d\n", ret);
} }
} }
...@@ -486,7 +486,7 @@ void gb_connection_latency_tag_disable(struct gb_connection *connection) ...@@ -486,7 +486,7 @@ 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->dev, dev_err(&connection->bundle->dev,
"failed to disable latency tag: %d\n", ret); "failed to disable latency tag: %d\n", ret);
} }
} }
...@@ -513,7 +513,7 @@ int gb_connection_bind_protocol(struct gb_connection *connection) ...@@ -513,7 +513,7 @@ int gb_connection_bind_protocol(struct gb_connection *connection)
connection->major, connection->major,
connection->minor); connection->minor);
if (!protocol) { if (!protocol) {
dev_warn(&connection->dev, dev_warn(&connection->bundle->dev,
"protocol 0x%02hhx version %hhu.%hhu not found\n", "protocol 0x%02hhx version %hhu.%hhu not found\n",
connection->protocol_id, connection->protocol_id,
connection->major, connection->minor); connection->major, connection->minor);
......
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