aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/greybus/connection.c
diff options
context:
space:
mode:
authorJohan Hovold <johan@hovoldconsulting.com>2016-05-27 17:26:28 +0200
committerGreg Kroah-Hartman <gregkh@google.com>2016-05-27 12:19:29 -0700
commit3cbe52c2e07ddb2c1f75e0ff9ff4e33a8e478877 (patch)
treeedf52d0fc2bd83282c46745fd49deb20432b7aab /drivers/staging/greybus/connection.c
parentgreybus: svc: add stub connection-quiescing operation (diff)
downloadlinux-dev-3cbe52c2e07ddb2c1f75e0ff9ff4e33a8e478877.tar.xz
linux-dev-3cbe52c2e07ddb2c1f75e0ff9ff4e33a8e478877.zip
greybus: connection: log cport-enable error messages
Log failures to disable a host cport, and include the connection name in cport enable/disable error messages. Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Johan Hovold <johan@hovoldconsulting.com> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Diffstat (limited to 'drivers/staging/greybus/connection.c')
-rw-r--r--drivers/staging/greybus/connection.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/drivers/staging/greybus/connection.c b/drivers/staging/greybus/connection.c
index 2da713ca7fea..785b60b09c46 100644
--- a/drivers/staging/greybus/connection.c
+++ b/drivers/staging/greybus/connection.c
@@ -278,7 +278,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(&hd->dev,
- "failed to enable host cport: %d\n", ret);
+ "%s: failed to enable host cport: %d\n",
+ connection->name, ret);
return ret;
}
@@ -288,11 +289,17 @@ static int gb_connection_hd_cport_enable(struct gb_connection *connection)
static void gb_connection_hd_cport_disable(struct gb_connection *connection)
{
struct gb_host_device *hd = connection->hd;
+ int ret;
if (!hd->driver->cport_disable)
return;
- hd->driver->cport_disable(hd, connection->hd_cport_id);
+ ret = hd->driver->cport_disable(hd, connection->hd_cport_id);
+ if (ret) {
+ dev_err(&hd->dev,
+ "%s: failed to disable host cport: %d\n",
+ connection->name, ret);
+ }
}
static int