diff options
author | Viresh Kumar <viresh.kumar@linaro.org> | 2016-04-21 11:31:14 +0530 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@google.com> | 2016-04-21 16:11:15 +0900 |
commit | ecdd3a2d59321ebd46c595dbadf24f50364a052a (patch) | |
tree | 1179bc5230e2d22cbf76bca4551f5bf503a73f7a /drivers/staging/greybus/es2.c | |
parent | a0f997bd5db42eb21d42f04d10cbe03f3fc4fa91 (diff) | |
download | op-kernel-dev-ecdd3a2d59321ebd46c595dbadf24f50364a052a.zip op-kernel-dev-ecdd3a2d59321ebd46c595dbadf24f50364a052a.tar.gz |
greybus: es2: disable cport-in after remove greybus host device
This allows greybus to do operations before being removed.
Tested by removing the gb-es2.ko module on both EVT1.5 and qemu with
gbsim. The driver removes the greybus host device successfully before
disabling the urbs. The errors are still coming ("urb cport in error -2
(dropped)"), but with an error value -2 (ENOENT) instead of -108. And
that happens while the urbs are disabled, not while doing greybus
operations.
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Acked-by: David Lin <dtwlin@google.com>
Reviewed-by: Johan Hovold <johan@hovoldconsulting.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Diffstat (limited to 'drivers/staging/greybus/es2.c')
-rw-r--r-- | drivers/staging/greybus/es2.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/staging/greybus/es2.c b/drivers/staging/greybus/es2.c index 0cc9fe6..8138bc2 100644 --- a/drivers/staging/greybus/es2.c +++ b/drivers/staging/greybus/es2.c @@ -695,11 +695,11 @@ static void ap_disconnect(struct usb_interface *interface) struct es2_ap_dev *es2 = usb_get_intfdata(interface); int i; + gb_hd_del(es2->hd); + for (i = 0; i < NUM_BULKS; ++i) es2_cport_in_disable(es2, &es2->cport_in[i]); - gb_hd_del(es2->hd); - es2_destroy(es2); } |