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

Commit eb1fff19 authored by Ajay Agarwal's avatar Ajay Agarwal Committed by Gerrit - the friendly Code Review server
Browse files

usb: ci13xxx: Mark USB gadget driver to NULL in udc_stop



Cases like restarting ADB do the stop and start of UDC. But
ci13xxx_start fails with EBUSY error because udc->driver is
not NULL. And hence peripheral mode does not work.
Fix this by marking udc->driver to NULL in ci13xxx_stop.

Change-Id: I85c4fe017848a1e5b7319b65dac471704ca5fb21
Signed-off-by: default avatarAjay Agarwal <ajaya@codeaurora.org>
parent 2dc3339c
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -3678,6 +3678,7 @@ static int ci13xxx_stop(struct usb_gadget *gadget)
		spin_lock_irqsave(udc->lock, flags);
	}

	udc->driver = NULL;
	spin_unlock_irqrestore(udc->lock, flags);

	usb_ep_free_request(&udc->ep0in.ep, udc->status);