linux-stable/drivers/usb/dwc3
Peter Chen e81a7018d9 usb: dwc3: allocate gadget structure dynamically
The current code uses commit fac323471d ("usb: udc: allow adding
and removing the same gadget device") as the workaround to let
the gadget device is re-used, but it is not allowed from driver
core point. In this commit, we allocate gadget structure dynamically,
and free it at its release function. Since the gadget device's
driver_data has already occupied by usb_composite_dev structure, we have
to use gadget device's platform data to store dwc3 structure.

Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Alan Stern <stern@rowland.harvard.edu>
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Peter Chen <peter.chen@nxp.com>
Signed-off-by: Felipe Balbi <balbi@kernel.org>
2020-10-02 09:57:42 +03:00
..
core.c usb: dwc3: core: do not queue work if dr_mode is not USB_DR_MODE_OTG 2020-10-02 09:43:36 +03:00
core.h usb: dwc3: allocate gadget structure dynamically 2020-10-02 09:57:42 +03:00
debug.h usb: dwc3: debug: fix checkpatch warning 2020-10-02 09:43:35 +03:00
debugfs.c usb: dwc3: debugfs: fix checkpatch warnings 2020-10-02 09:43:35 +03:00
drd.c usb: dwc3: Replace HTTP links with HTTPS ones 2020-07-15 16:33:51 +02:00
dwc3-exynos.c Revert "usb: dwc3: exynos: Add support for Exynos5422 suspend clk" 2020-06-24 09:52:23 +03:00
dwc3-haps.c usb: dwc3: dwc3-haps: Function headers are not suitable for kerneldoc 2020-07-03 10:18:40 +02:00
dwc3-keystone.c usb: dwc3: Replace HTTP links with HTTPS ones 2020-07-15 16:33:51 +02:00
dwc3-meson-g12a.c usb: dwc-meson-g12a: Add support for USB on AXG SoCs 2020-10-02 09:57:39 +03:00
dwc3-of-simple.c usb: dwc3: simple: add support for Hikey 970 2020-09-24 11:56:01 +03:00
dwc3-omap.c usb: dwc3: Replace HTTP links with HTTPS ones 2020-07-15 16:33:51 +02:00
dwc3-pci.c usb: dwc3: pci: Allow Elkhart Lake to utilize DSM method for PM functionality 2020-10-02 09:57:40 +03:00
dwc3-qcom.c usb: dwc3: qcom: fix checkpatch warnings 2020-10-02 09:43:35 +03:00
dwc3-st.c usb: dwc3: convert to devm_platform_ioremap_resource_byname 2020-07-29 16:49:37 +02:00
ep0.c usb: dwc3: allocate gadget structure dynamically 2020-10-02 09:57:42 +03:00
gadget.c usb: dwc3: allocate gadget structure dynamically 2020-10-02 09:57:42 +03:00
gadget.h usb: dwc3: allocate gadget structure dynamically 2020-10-02 09:57:42 +03:00
host.c usb: dwc3: Replace HTTP links with HTTPS ones 2020-07-15 16:33:51 +02:00
io.h usb: dwc3: Replace HTTP links with HTTPS ones 2020-07-15 16:33:51 +02:00
Kconfig usb: dwc3: select USB_ROLE_SWITCH 2020-05-09 11:05:09 +03:00
Makefile
trace.c usb: dwc3: Replace HTTP links with HTTPS ones 2020-07-15 16:33:51 +02:00
trace.h usb: dwc3: trace: fix checkpatch warnings 2020-10-02 09:43:35 +03:00
ulpi.c usb: dwc3: ulpi: fix checkpatch warning 2020-10-02 09:43:35 +03:00