usb: mtu3: sync interrupt before unbind the udc

Register gadget irq to avoid the interrupt handler is occurred
or scheduled during the unbind flow, may happen when do android
function switch stress test.

Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
Link: https://lore.kernel.org/r/20220609074233.15532-1-chunfeng.yun@mediatek.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Chunfeng Yun 2022-06-09 15:42:31 +08:00 committed by Greg Kroah-Hartman
parent 757bdf1f2f
commit 5e1fa6dd4c

View file

@ -680,6 +680,7 @@ int mtu3_gadget_setup(struct mtu3 *mtu)
mtu->g.speed = USB_SPEED_UNKNOWN;
mtu->g.sg_supported = 0;
mtu->g.name = MTU3_DRIVER_NAME;
mtu->g.irq = mtu->irq;
mtu->is_active = 0;
mtu->delayed_status = false;