summaryrefslogtreecommitdiffstats
path: root/drivers/staging/greybus
diff options
context:
space:
mode:
authorAlex Elder <elder@linaro.org>2014-11-05 16:03:12 -0600
committerGreg Kroah-Hartman <greg@kroah.com>2014-11-05 14:12:26 -0800
commit6b09938a48d4fd86596c75b19aea3286da2e4d9f (patch)
tree62cd6a98f59e54a3040414c96b2ccc52b2750dba /drivers/staging/greybus
parent545a697512a0b9c08ae4f152b7dd146f02dcbb92 (diff)
downloadlinux-6b09938a48d4fd86596c75b19aea3286da2e4d9f.tar.gz
linux-6b09938a48d4fd86596c75b19aea3286da2e4d9f.tar.bz2
linux-6b09938a48d4fd86596c75b19aea3286da2e4d9f.zip
greybus: improve some error messages
Add a few error messages to help explain the reason for failures. Add a missing space in a message in svc_management(). Signed-off-by: Alex Elder <elder@linaro.org> Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
Diffstat (limited to 'drivers/staging/greybus')
-rw-r--r--drivers/staging/greybus/ap.c2
-rw-r--r--drivers/staging/greybus/connection.c3
-rw-r--r--drivers/staging/greybus/interface.c2
-rw-r--r--drivers/staging/greybus/module.c2
4 files changed, 8 insertions, 1 deletions
diff --git a/drivers/staging/greybus/ap.c b/drivers/staging/greybus/ap.c
index 24a15e9c6009..a8cd7e7cdd60 100644
--- a/drivers/staging/greybus/ap.c
+++ b/drivers/staging/greybus/ap.c
@@ -150,7 +150,7 @@ static void svc_management(struct svc_function_unipro_management *management,
management->link_up.interface_id,
management->link_up.device_id);
if (ret)
- dev_err(hd->parent, "error %d initializing"
+ dev_err(hd->parent, "error %d initializing "
"module %hhu interface %hhu\n",
ret, management->link_up.module_id,
management->link_up.interface_id);
diff --git a/drivers/staging/greybus/connection.c b/drivers/staging/greybus/connection.c
index c4b650522ac2..1a8f53ef34cf 100644
--- a/drivers/staging/greybus/connection.c
+++ b/drivers/staging/greybus/connection.c
@@ -164,6 +164,7 @@ struct gb_connection *gb_connection_create(struct gb_interface *interface,
INIT_LIST_HEAD(&connection->protocol_links);
if (!gb_protocol_get(connection, protocol_id)) {
+ pr_err("protocol 0x%02hhx not found\n", protocol_id);
kfree(connection);
return NULL;
}
@@ -191,6 +192,8 @@ struct gb_connection *gb_connection_create(struct gb_interface *interface,
retval = device_add(&connection->dev);
if (retval) {
+ pr_err("failed to add connection device for cport 0x%04hx\n",
+ cport_id);
gb_connection_hd_cport_id_free(connection);
gb_protocol_put(connection);
put_device(&connection->dev);
diff --git a/drivers/staging/greybus/interface.c b/drivers/staging/greybus/interface.c
index 163cdc439e0c..eb63f638fc2c 100644
--- a/drivers/staging/greybus/interface.c
+++ b/drivers/staging/greybus/interface.c
@@ -78,6 +78,8 @@ gb_interface_create(struct gb_module *gmod, u8 interface_id)
retval = device_add(&interface->dev);
if (retval) {
+ pr_err("failed to add interface device for id 0x%02hhx\n",
+ interface_id);
kfree(interface);
return NULL;
}
diff --git a/drivers/staging/greybus/module.c b/drivers/staging/greybus/module.c
index 3a64a2b3eb06..9cf98cd8d53d 100644
--- a/drivers/staging/greybus/module.c
+++ b/drivers/staging/greybus/module.c
@@ -100,6 +100,8 @@ struct gb_module *gb_module_create(struct greybus_host_device *hd, u8 module_id)
retval = device_add(&gmod->dev);
if (retval) {
+ pr_err("failed to add module device for id 0x%02hhx\n",
+ module_id);
put_device(&gmod->dev);
return NULL;
}