Revert "usb: udc: allow adding and removing the same gadget device"

We have already allocated gadget structure dynamically at UDC (dwc3)
driver, so commit fac323471d ("usb: udc: allow adding and removing
the same gadget device")could be reverted.

Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Alan Stern <stern@rowland.harvard.edu>
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Reviewed-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Peter Chen <peter.chen@nxp.com>
Signed-off-by: Felipe Balbi <balbi@kernel.org>
This commit is contained in:
Peter Chen 2020-08-21 10:55:49 +08:00 committed by Felipe Balbi
parent e81a7018d9
commit 7595c38bb1

View File

@ -1389,7 +1389,6 @@ void usb_del_gadget_udc(struct usb_gadget *gadget)
{
usb_del_gadget(gadget);
usb_put_gadget(gadget);
memset(&gadget->dev, 0x00, sizeof(gadget->dev));
}
EXPORT_SYMBOL_GPL(usb_del_gadget_udc);