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