Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+3 −1
Original line number Original line Diff line number Diff line
@@ -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)


		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 */