summaryrefslogtreecommitdiff
path: root/drivers/staging/greybus/interface.c
diff options
context:
space:
mode:
authorJohan Hovold <johan@hovoldconsulting.com>2016-05-27 17:26:22 +0200
committerGreg Kroah-Hartman <gregkh@google.com>2016-05-27 12:19:29 -0700
commit7aefe7918f8e053f9cd8077fcc98182689f1341e (patch)
tree6e3c9c0ac0d8687477a3963c81f89b252aeb1423 /drivers/staging/greybus/interface.c
parent898d75f4aa8b1aeb99df8fe275cb3fcfa3dc0688 (diff)
greybus: core: avoid I/O to disconnected interfaces
Add new helper to disable connections to interfaces that have already been disconnected (e.g. forcibly removed). The connection tear-down procedure differs enough depending on whether the interface is still present or already gone to warrant a dedicated helper. This will become more obvious with the new tear-down procedure, which involves I/O on the connection being tore down. This also simplifies handling of the legacy bootrom, which does not support the new tear-down operations. Specifically, this allows us to remove the early control-connection tear down during interface disable, and also avoids some error messages currently printed during legacy mode switch (i.e. bootrom boot-over-UniPro) and forcible removal. Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Johan Hovold <johan@hovoldconsulting.com> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Diffstat (limited to 'drivers/staging/greybus/interface.c')
-rw-r--r--drivers/staging/greybus/interface.c7
1 files changed, 0 insertions, 7 deletions
diff --git a/drivers/staging/greybus/interface.c b/drivers/staging/greybus/interface.c
index c19a09cea462..d1e2c456462e 100644
--- a/drivers/staging/greybus/interface.c
+++ b/drivers/staging/greybus/interface.c
@@ -671,13 +671,6 @@ void gb_interface_disable(struct gb_interface *intf)
trace_gb_interface_disable(intf);
- /*
- * Disable the control-connection early to avoid operation timeouts
- * when the interface is already gone.
- */
- if (intf->disconnected)
- gb_control_disable(intf->control);
-
list_for_each_entry_safe(bundle, next, &intf->bundles, links)
gb_bundle_destroy(bundle);