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:
parent
f6624ca77c
commit
715d7a7280
@ -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 */
|
||||
|
Loading…
x
Reference in New Issue
Block a user