summaryrefslogtreecommitdiffstats
path: root/drivers/staging/greybus/connection.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@google.com>2015-10-16 16:56:23 -0700
committerGreg Kroah-Hartman <gregkh@google.com>2015-10-19 12:09:10 -0700
commit30482c1e63f3530f38f9364b90e35f1e9a990a4c (patch)
tree766999ed49522d78037a3fded8115247e0e7bb5b /drivers/staging/greybus/connection.c
parentb750fa3370485356b5cddda7c0f7fc9bea056fa8 (diff)
downloadlinux-stable-30482c1e63f3530f38f9364b90e35f1e9a990a4c.tar.gz
linux-stable-30482c1e63f3530f38f9364b90e35f1e9a990a4c.tar.bz2
linux-stable-30482c1e63f3530f38f9364b90e35f1e9a990a4c.zip
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: 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>
Diffstat (limited to 'drivers/staging/greybus/connection.c')
-rw-r--r--drivers/staging/greybus/connection.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/drivers/staging/greybus/connection.c b/drivers/staging/greybus/connection.c
index abd857703917..0be78fe8f50f 100644
--- a/drivers/staging/greybus/connection.c
+++ b/drivers/staging/greybus/connection.c
@@ -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,8 +199,8 @@ 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,
- "failed to enable host cport: %d\n", ret);
+ dev_err(&connection->bundle->dev,
+ "failed to enable host cport: %d\n", ret);
return ret;
}
@@ -277,8 +277,8 @@ gb_connection_svc_connection_create(struct gb_connection *connection)
connection->intf_cport_id,
intf->boot_over_unipro);
if (ret) {
- dev_err(&connection->dev,
- "failed to create svc connection: %d\n", ret);
+ dev_err(&connection->bundle->dev,
+ "failed to create svc connection: %d\n", ret);
return ret;
}
@@ -313,8 +313,8 @@ static int gb_connection_control_connected(struct gb_connection *connection)
ret = gb_control_connected_operation(control, cport_id);
if (ret) {
- dev_err(&connection->dev,
- "failed to connect cport: %d\n", ret);
+ dev_err(&connection->bundle->dev,
+ "failed to connect cport: %d\n", ret);
return ret;
}
@@ -337,8 +337,8 @@ gb_connection_control_disconnected(struct gb_connection *connection)
ret = gb_control_disconnected_operation(control, cport_id);
if (ret) {
- dev_warn(&connection->dev,
- "failed to disconnect cport: %d\n", ret);
+ dev_warn(&connection->bundle->dev,
+ "failed to disconnect cport: %d\n", ret);
}
}
@@ -356,8 +356,8 @@ static int gb_connection_protocol_get_version(struct gb_connection *connection)
ret = gb_protocol_get_version(connection);
if (ret) {
- dev_err(&connection->dev,
- "failed to get protocol version: %d\n", ret);
+ 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);