greybus: module: suppress activation error message for dummy interfaces
authorJohan Hovold <johan@hovoldconsulting.com>
Tue, 19 Jul 2016 13:24:50 +0000 (15:24 +0200)
committerGreg Kroah-Hartman <gregkh@google.com>
Wed, 20 Jul 2016 02:06:34 +0000 (19:06 -0700)
We currently handle dummy interfaces by deactivating them using
activation error paths, but we don't want the corresponding
module_inserted error message to be printed.

Signed-off-by: Johan Hovold <johan@hovoldconsulting.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
drivers/staging/greybus/module.c

index 7f0ed9f..242be49 100644 (file)
@@ -153,8 +153,11 @@ static void gb_module_register_interface(struct gb_interface *intf)
                        break;
        }
        if (ret) {
-               dev_err(&module->dev, "failed to activate interface %u: %d\n",
-                               intf_id, ret);
+               if (intf->type != GB_SVC_INTF_TYPE_DUMMY) {
+                       dev_err(&module->dev,
+                                       "failed to activate interface %u: %d\n",
+                                       intf_id, ret);
+               }
 
                /*
                 * -EAGAIN indicates that the Greybus operation