greybus: interface: add comment about early control-connection disable
authorJohan Hovold <johan@hovoldconsulting.com>
Wed, 9 Mar 2016 11:20:33 +0000 (12:20 +0100)
committerGreg Kroah-Hartman <gregkh@google.com>
Thu, 10 Mar 2016 21:57:42 +0000 (13:57 -0800)
Add comment about why the control connection is disabled early when the
interface is already gone.

Signed-off-by: Johan Hovold <johan@hovoldconsulting.com>
Reviewed-by: Jeffrey Carlyle <jcarlyle@google.com>
Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
drivers/staging/greybus/interface.c

index 2f3966f..5c5c422 100644 (file)
@@ -147,6 +147,10 @@ void gb_interface_remove(struct gb_interface *intf)
        struct gb_bundle *bundle;
        struct gb_bundle *next;
 
+       /*
+        * Disable the control-connection early to avoid operation timeouts
+        * when the interface is already gone.
+        */
        if (intf->disconnected)
                gb_control_disable(intf->control);