Commit 3cbe52c2 authored by Johan Hovold's avatar Johan Hovold Committed by Greg Kroah-Hartman

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: default avatarViresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: default avatarJohan Hovold <johan@hovoldconsulting.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@google.com>
parent 96f5ab00
...@@ -278,7 +278,8 @@ static int gb_connection_hd_cport_enable(struct gb_connection *connection) ...@@ -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); ret = hd->driver->cport_enable(hd, connection->hd_cport_id);
if (ret) { if (ret) {
dev_err(&hd->dev, 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; return ret;
} }
...@@ -288,11 +289,17 @@ static int gb_connection_hd_cport_enable(struct gb_connection *connection) ...@@ -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) static void gb_connection_hd_cport_disable(struct gb_connection *connection)
{ {
struct gb_host_device *hd = connection->hd; struct gb_host_device *hd = connection->hd;
int ret;
if (!hd->driver->cport_disable) if (!hd->driver->cport_disable)
return; 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 static int
......
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