usb: gadget: fsl_udc: pass controller instance to unregister
ci_udc_unregister() used to unregister "the controller". Since we
may register multiple chipidea devices we called ci_udc_unregister()
for each of them. This led to messages like:

ERROR: imx-usb 53f80000.usb: gadget not registered.

Fix this by returning the registered controller. This allows us to call
ci_udc_unregister() only when we actually registered one before.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
1 parent 7da5b5c commit 28b38c1804d761257397f41ae2bbc071cd009935
@Sascha Hauer Sascha Hauer authored on 26 Oct 2018
Showing 3 changed files
View
drivers/usb/gadget/fsl_udc.c
View
drivers/usb/imx/chipidea-imx.c
View
include/usb/fsl_usb2.h