summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohan Hovold <johan@hovoldconsulting.com>2016-07-19 13:24:49 (GMT)
committerGreg Kroah-Hartman <gregkh@google.com>2016-07-20 02:06:34 (GMT)
commitc80a982fc1f8b2b1546c4b2acc08ffd543f6f6c5 (patch)
treee7944c1f565c738cbfcd77d377a85febe6967623
parent835642526e9310d435cc718cdb69f2fcd7a53b84 (diff)
downloadlinux-c80a982fc1f8b2b1546c4b2acc08ffd543f6f6c5.tar.xz
greybus: interface: amend interface registration message
Amend the interface registration message with the detected interface type, and only print the Ara VID/PID and DDBL1 attributes for the types for which they exist. Also drop the now redundant message about a detected dummy interface from the activate operation helper. Signed-off-by: Johan Hovold <johan@hovoldconsulting.com> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
-rw-r--r--drivers/staging/greybus/interface.c19
1 files changed, 14 insertions, 5 deletions
diff --git a/drivers/staging/greybus/interface.c b/drivers/staging/greybus/interface.c
index c27b18b..22b7342 100644
--- a/drivers/staging/greybus/interface.c
+++ b/drivers/staging/greybus/interface.c
@@ -829,7 +829,6 @@ static int gb_interface_activate_operation(struct gb_interface *intf)
switch (type) {
case GB_SVC_INTF_TYPE_DUMMY:
- dev_info(&intf->dev, "dummy interface detected\n");
/* FIXME: handle as an error for now */
return -ENODEV;
case GB_SVC_INTF_TYPE_UNIPRO:
@@ -1131,10 +1130,20 @@ int gb_interface_add(struct gb_interface *intf)
trace_gb_interface_add(intf);
- dev_info(&intf->dev, "Interface added: VID=0x%08x, PID=0x%08x\n",
- intf->vendor_id, intf->product_id);
- dev_info(&intf->dev, "DDBL1 Manufacturer=0x%08x, Product=0x%08x\n",
- intf->ddbl1_manufacturer_id, intf->ddbl1_product_id);
+ dev_info(&intf->dev, "Interface added (%s)\n",
+ gb_interface_type_string(intf));
+
+ switch (intf->type) {
+ case GB_SVC_INTF_TYPE_GREYBUS:
+ dev_info(&intf->dev, "Ara VID=0x%08x, PID=0x%08x\n",
+ intf->vendor_id, intf->product_id);
+ /* fall-through */
+ case GB_SVC_INTF_TYPE_UNIPRO:
+ dev_info(&intf->dev, "DDBL1 Manufacturer=0x%08x, Product=0x%08x\n",
+ intf->ddbl1_manufacturer_id,
+ intf->ddbl1_product_id);
+ break;
+ }
return 0;
}