greybus: es1: separate stopping and deallocating urbs

Separate stopping and deallocating our in-urbs.

This will facilitate implementing proper host-device life-time management.

Compile-only tested.

Signed-off-by: Johan Hovold <johan@hovoldconsulting.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
Johan Hovold 2015-11-04 18:55:17 +01:00 committed by Greg Kroah-Hartman
parent f6624ca77c
commit 715d7a7280
1 changed files with 3 additions and 1 deletions

View File

@ -369,6 +369,9 @@ static void ap_disconnect(struct usb_interface *interface)
if (!es1)
return;
for (i = 0; i < NUM_CPORT_IN_URB; ++i)
usb_kill_urb(es1->cport_in_urb[i]);
usb_log_disable(es1);
/* Tear down everything! */
@ -377,7 +380,6 @@ static void ap_disconnect(struct usb_interface *interface)
if (!urb)
break;
usb_kill_urb(urb);
usb_free_urb(urb);
es1->cport_out_urb[i] = NULL;
es1->cport_out_urb_busy[i] = false; /* just to be anal */