Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

usb: dwc3: gadget: Revert "set gadgets parent to the right controller"

The commit c6e23b89a95d ("usb: dwc3: gadget: set gadgets parent to the right
controller") changed the device for the UDC and broke the user space scripts
that instantiate the USB gadget(s) via ConfigFS.

Revert it for now until the better solution will be proposed.

Fixes: c6e23b89a95d ("usb: dwc3: gadget: set gadgets parent to the right controller")
Tested-by: Ferry Toth <fntoth@gmail.com>
Cc: Michael Grzeschik <m.grzeschik@pengutronix.de>
Cc: Felipe Balbi <balbi@kernel.org>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20211004141839.49079-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Andy Shevchenko and committed by
Greg Kroah-Hartman
268bbde7 3ea75b3f

+1 -1
+1 -1
drivers/usb/dwc3/gadget.c
··· 4243 4243 } 4244 4244 4245 4245 4246 - usb_initialize_gadget(dwc->sysdev, dwc->gadget, dwc_gadget_release); 4246 + usb_initialize_gadget(dwc->dev, dwc->gadget, dwc_gadget_release); 4247 4247 dev = &dwc->gadget->dev; 4248 4248 dev->platform_data = dwc; 4249 4249 dwc->gadget->ops = &dwc3_gadget_ops;