usb: gadget: ci13xxx: Unbind composite driver after disabling EP0

Currently the UDC core driver unbinds the composite driver and
then stops the UDC. In the case when an EP0 request is still
pending with the controller, this leads to the pending request's
buffer being freed up first and then unmapping of the dma range.
This leads to invalid DMA ops.
Fix this by first disabling EP0 from pulldown callback which
will unmap the DMA for queued requests and release them, and
then unbinding the composite driver.

Change-Id: I134b3c006f1210e345f9f0a0ad9b69792091cfc0
Signed-off-by: Ajay Agarwal <ajaya@codeaurora.org>
1 file changed