Commit 715d7a72 authored by Johan Hovold's avatar Johan Hovold Committed by Greg Kroah-Hartman

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: default avatarJohan Hovold <johan@hovoldconsulting.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@google.com>
parent f6624ca7
...@@ -369,6 +369,9 @@ static void ap_disconnect(struct usb_interface *interface) ...@@ -369,6 +369,9 @@ static void ap_disconnect(struct usb_interface *interface)
if (!es1) if (!es1)
return; return;
for (i = 0; i < NUM_CPORT_IN_URB; ++i)
usb_kill_urb(es1->cport_in_urb[i]);
usb_log_disable(es1); usb_log_disable(es1);
/* Tear down everything! */ /* Tear down everything! */
...@@ -377,7 +380,6 @@ static void ap_disconnect(struct usb_interface *interface) ...@@ -377,7 +380,6 @@ static void ap_disconnect(struct usb_interface *interface)
if (!urb) if (!urb)
break; break;
usb_kill_urb(urb);
usb_free_urb(urb); usb_free_urb(urb);
es1->cport_out_urb[i] = NULL; es1->cport_out_urb[i] = NULL;
es1->cport_out_urb_busy[i] = false; /* just to be anal */ es1->cport_out_urb_busy[i] = false; /* just to be anal */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment